Skip to content
Snippets Groups Projects
Commit c1bcb9c0 authored by Florian Schültke's avatar Florian Schültke
Browse files

aircraft_design (schueltke):

 - update cmake for static release
parent b21a318e
No related tags found
No related merge requests found
......@@ -33,6 +33,8 @@ endif()
option(BUILD_BLACKBOXTESTS "Use blackbox testing" OFF)
# Option for unit testing
option(BUILD_UNITTEST "Use unit testing" OFF)
# Option to include system libraries in the package archive
option(PACKAGE_SYSTEM_LIBRARIES "Include system libraries in the package archive" OFF)
# Option where to look for the libraries
option(FIND_LIBRARIES_AS_PACKAGE "If true the libraries are included with find_package(), otherwise the submodule is used." OFF)
# Option to compile Python modules to an executable
......@@ -74,6 +76,20 @@ else()
add_subdirectory(libs)
endif()
if(PACKAGE_SYSTEM_LIBRARIES)
if(BUILD_SHARED_LIBS)
get_filename_component( SYSTEM_LIBS_PATH ${CMAKE_CXX_COMPILER} PATH )
message(STATUS "[${PROJECT_NAME}] -> Packaging System Libraries from: ${SYSTEM_LIBS_PATH}")
message(DEPRECATION "Packaging system libraries is enabled. This will be removed in the future due to the native compiler support!")
else() # Activate static linkage of compiler runtime libs
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MT")
else(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
endif()
endif()
endif()
# === External dependencies ===
include(FetchContent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment