diff --git a/cmake/modules/BasicConfig.cmake b/cmake/modules/BasicConfig.cmake index 5320c69..e70e45f 100644 --- a/cmake/modules/BasicConfig.cmake +++ b/cmake/modules/BasicConfig.cmake @@ -60,12 +60,17 @@ endif() # options for deciding whether to build static and/or shared libraries if(("${META_PROJECT_TYPE}" STREQUAL "library") OR ("${META_PROJECT_TYPE}" STREQUAL "")) - option(BUILD_STATIC_LIBS "whether to build static libraries (disabled by default)" OFF) - option(DISABLE_SHARED_LIBS "whether building dynamic libraries is disabled (prevents BUILD_SHARED_LIBS being re-enabled when using Qt Creator)" OFF) + option(ENABLE_STATIC_LIBS "whether to building static libraries is enabled (disabled by default)" OFF) + option(DISABLE_SHARED_LIBS "whether building dynamic libraries is disabled (enabled by default)" OFF) if(DISABLE_SHARED_LIBS) set(BUILD_SHARED_LIBS OFF) else() - option(BUILD_SHARED_LIBS "whether to build dynamic libraries (enabled by default)" ON) + set(BUILD_SHARED_LIBS ON) + endif() + if(ENABLE_STATIC_LIBS) + set(BUILD_STATIC_LIBS ON) + else() + set(BUILD_STATIC_LIBS OFF) endif() endif()