Skip to content

Commit

Permalink
Add ODAS_DISABLE_INSTALL
Browse files Browse the repository at this point in the history
  • Loading branch information
doumdi committed Jun 18, 2024
1 parent b4f3b50 commit bcb8454
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ endif(COMMAND cmake_policy)

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)


find_package(PkgConfig REQUIRED)
pkg_check_modules(PC_FFTW3 REQUIRED fftw3f)
Expand Down Expand Up @@ -224,19 +226,22 @@ target_link_libraries(odasserver
odas
)

install(TARGETS odas LIBRARY DESTINATION lib)
install(
DIRECTORY include/
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
)

if(ODAS_INSTALL_EXECUTABLES)
install(TARGETS odaslive DESTINATION bin)
install(TARGETS odasserver DESTINATION bin)
if (NOT ODAS_DISABLE_INSTALL)
install(TARGETS odas LIBRARY DESTINATION lib)
install(
DIRECTORY include/
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
)

if(ODAS_INSTALL_EXECUTABLES)
install(TARGETS odaslive DESTINATION bin)
install(TARGETS odasserver DESTINATION bin)
endif()
endif()


if(ODAS_FORCE_BIN_AND_LIB_DIRS)
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
Expand Down

0 comments on commit bcb8454

Please sign in to comment.