Skip to content

Commit

Permalink
Merge pull request #275 from paullouisageneau/cmake-build-shared-libs
Browse files Browse the repository at this point in the history
CMake: Comply with BUILD_SHARED_LIBS option
  • Loading branch information
paullouisageneau authored Oct 22, 2024
2 parents 658ec6b + 6a0f06e commit 5095b40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project (libjuice
LANGUAGES C)
set(PROJECT_DESCRIPTION "UDP Interactive Connectivity Establishment (ICE) library")

option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(USE_NETTLE "Use Nettle for hash functions" OFF)
option(NO_SERVER "Disable server support" OFF)
option(NO_TESTS "Disable tests build" OFF)
Expand Down Expand Up @@ -89,7 +90,7 @@ source_group("Fuzzer Files" FILES "${FUZZER_SOURCES}")
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_library(juice SHARED ${LIBJUICE_SOURCES})
add_library(juice ${LIBJUICE_SOURCES})
set_target_properties(juice PROPERTIES VERSION ${PROJECT_VERSION})
target_include_directories(juice PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand Down

0 comments on commit 5095b40

Please sign in to comment.