Support BUILD_SHARED_LIBS cmake variable

This commit is contained in:
Dennis Klein
2018-09-19 18:19:55 +02:00
parent 0901655a65
commit 49a6e9389d
2 changed files with 6 additions and 1 deletions

View File

@@ -125,6 +125,10 @@ macro(set_fairlogger_defaults)
# Generate compile_commands.json file (https://clang.llvm.org/docs/JSONCompilationDatabase.html)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON CACHE BOOL "Whether to build shared libraries or static archives")
endif()
# Define CMAKE_INSTALL_*DIR family of variables
include(GNUInstallDirs)