From: ibs Date: Fri, 16 Jan 2015 09:15:11 +0000 (+0300) Subject: 0025713: CMake configuring procedure should allow to build OCCT as static libraries X-Git-Tag: V6_9_0~29 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=c259930b8e725bb5b60d178843ffcf4407b8da74;p=occt-copy.git 0025713: CMake configuring procedure should allow to build OCCT as static libraries BUILD_LIBRARY_TYPE variable added --- diff --git a/CMakeLists.txt b/CMakeLists.txt index cc7225e3da..0a9ecf10b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,18 @@ endif() set (CMAKE_CONFIGURATION_TYPES ${BUILD_CONFIGURATION} CACHE INTERNAL "" FORCE) +# set type of OCCT libraries +if (NOT BUILD_LIBRARY_TYPE) + set (BUILD_LIBRARY_TYPE "Shared" CACHE STRING "The type of OCCT libraries" FORCE) + SET_PROPERTY(CACHE BUILD_LIBRARY_TYPE PROPERTY STRINGS Shared Static) +endif() + +if ("${BUILD_LIBRARY_TYPE}" STREQUAL "Shared") + set (BUILD_SHARED_LIBS ON) +else() + unset (BUILD_SHARED_LIBS) +endif() + # the name of the project project (OCCT)