diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2022-04-27 19:53:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 19:53:13 +0200 |
commit | 0caf685360f1c06173f5bfd084b8679d517389f9 (patch) | |
tree | f989191aa495168398c98c7d4abb28d9c146fd21 /CMakeLists.txt | |
parent | 1793632ee6988deb933ff7551fee92134622b558 (diff) | |
download | flac-0caf685360f1c06173f5bfd084b8679d517389f9.tar.gz |
[CMake] Enable building ogg together with flac (#325)
This reverts the part of commit 2013738 that searched for a local
ogg build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6163a254..7e6ae233 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,17 @@ if(NOT UNIX) endif() if(WITH_OGG) - find_package(Ogg REQUIRED) - set(OGG_PACKAGE "ogg") + if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ogg") + add_subdirectory("ogg") + set(OGG_FOUND 1 CACHE INTERNAL "ogg has been added as subdirectory") + set_target_properties(ogg PROPERTIES FOLDER Libraries) + if(BUILD_TESTING) + set_target_properties(test_bitwise test_framing PROPERTIES FOLDER Tests) + endif() + else() + find_package(Ogg REQUIRED) + set(OGG_PACKAGE "ogg") + endif() endif() find_program (HAVE_GIT git) |