added conditional static/shared select to cmake

This commit is contained in:
John Dupuy
2023-11-07 17:29:44 -06:00
parent 274527102b
commit 5ec6c3e22c

View File

@@ -7,7 +7,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
include(GNUInstallDirs)
add_library(OndselSolver SHARED)
if( BUILD_SHARED_LIBS )
set( ONDSELSOLVER_BUILD_SHARED ON )
endif()
if ( ONDSELSOLVER_BUILD_SHARED )
message( STATUS "[OndselSolver] Building shared library" )
add_library(OndselSolver SHARED)
else()
message( STATUS "[OndselSolver] Building static library" )
add_library(OndselSolver STATIC)
endif()
set(ONDSELSOLVER_SRC
OndselSolver/Array.cpp