Skip to content

Commit

Permalink
fix: vcpkg is always built with voice
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Oct 12, 2024
1 parent a1a32d2 commit ff22ba4
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions library-vcpkg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@

add_compile_definitions(HAVE_VOICE)

if (HAVE_VOICE)
file(GLOB THE_SOURCES "${DPP_ROOT_PATH}/src/dpp/events/*.cpp" "${modules_dir}/dpp/voice/enabled/*.cpp" "${DPP_ROOT_PATH}/dpp/dave/*.cpp" "${DPP_ROOT_PATH}/src/dpp/cluster/*.cpp" "${DPP_ROOT_PATH}/src/dpp/*.cpp" "${DPP_ROOT_PATH}/src/dpp/*.rc")
else()
file(GLOB THE_SOURCES "${DPP_ROOT_PATH}/src/dpp/events/*.cpp" "${modules_dir}/dpp/voice/stub/*.cpp" "${DPP_ROOT_PATH}/src/dpp/cluster/*.cpp" "${DPP_ROOT_PATH}/src/dpp/*.cpp" "${DPP_ROOT_PATH}/src/dpp/*.rc")
endif()

file(GLOB THE_SOURCES "${DPP_ROOT_PATH}/src/dpp/events/*.cpp" "${modules_dir}/dpp/voice/enabled/*.cpp" "${DPP_ROOT_PATH}/dpp/dave/*.cpp" "${DPP_ROOT_PATH}/src/dpp/cluster/*.cpp" "${DPP_ROOT_PATH}/src/dpp/*.cpp" "${DPP_ROOT_PATH}/src/dpp/*.rc")

set(LIB_NAME "${PROJECT_NAME}")

Expand Down Expand Up @@ -87,12 +82,10 @@ target_include_directories(
"$<INSTALL_INTERFACE:include>"
)

if (HAVE_VOICE)
add_subdirectory("${DPP_ROOT_PATH}/mlspp" "mlspp")
include_directories("${DPP_ROOT_PATH}/mlspp/include")
include_directories("${DPP_ROOT_PATH}/mlspp/lib/bytes/include")
include_directories("${DPP_ROOT_PATH}/mlspp/lib/hpke/include")
endif()
add_subdirectory("${DPP_ROOT_PATH}/mlspp" "mlspp")
include_directories("${DPP_ROOT_PATH}/mlspp/include")
include_directories("${DPP_ROOT_PATH}/mlspp/lib/bytes/include")
include_directories("${DPP_ROOT_PATH}/mlspp/lib/hpke/include")

set_target_properties(
"${LIB_NAME}" PROPERTIES
Expand Down Expand Up @@ -120,17 +113,15 @@ target_link_libraries(
$<$<TARGET_EXISTS:Threads::Threads>:Threads::Threads>
)

if (HAVE_VOICE)
# Private statically linked dependencies
target_link_libraries(
${LIB_NAME} PRIVATE
mlspp
mls_vectors
bytes
tls_syntax
hpke
)
endif()
# Private statically linked dependencies
target_link_libraries(
${LIB_NAME} PRIVATE
mlspp
mls_vectors
bytes
tls_syntax
hpke
)

set(CONFIG_FILE_NAME "${PROJECT_NAME}Config.cmake")
set(EXPORTED_TARGETS_NAME "${PROJECT_NAME}Targets")
Expand Down

0 comments on commit ff22ba4

Please sign in to comment.