From 909b5c2b579127ad268d477904e575b83c3cae3d Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 6 Sep 2016 22:51:00 +0200 Subject: [PATCH] Rename variables for enabling/disabling shared/static libs Avoids conflicts when using mingw-w64-cmake wrapper --- cmake/modules/BasicConfig.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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()