Skip to content

Commit

Permalink
Added static/shared build
Browse files Browse the repository at this point in the history
  • Loading branch information
doumdi committed Jun 28, 2024
1 parent bcb8454 commit 6c89772
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

option(ODAS_BUILD_SHARED_LIBRARY "Build shared library" ON)
option(ODAS_INSTALL_EXECUTABLES "Install the odaslive and odasserver executables along with the odas library" OFF)
option(ODAS_FORCE_BIN_AND_LIB_DIRS "Force the installation of the odas library and executables in the bin and lib directories" ON)
option(ODAS_DISABLE_INSTALL "Disable the installation of the odas library and executables" OFF)
Expand Down Expand Up @@ -194,11 +195,14 @@ set(SRC

)

add_library(odas SHARED
${SRC}
)
if (ODAS_BUILD_SHARED_LIBRARY)
add_library(odas SHARED ${SRC})
else()
add_library(odas STATIC ${SRC})
endif()

target_link_libraries(odas
PUBLIC
${PC_FFTW3_LIBRARIES}
${PC_ALSA_LIBRARIES}
${PC_LIBCONFIG_LIBRARIES}
Expand Down

0 comments on commit 6c89772

Please sign in to comment.