]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/CMakeLists.txt
cmake: add shared library support
[lyx.git] / development / cmake / CMakeLists.txt
index 798cc5e4af44feadc86b395bdcffe8c41f24ddb7..2c10af054b76a720620f241fd6359bc9ca23d09b 100644 (file)
@@ -46,7 +46,8 @@ endif(merge OR MERGE_FILES)
 
 set(CMAKE_BUILD_TYPE)
 if(profile)
-       set(CMAKE_BUILD_TYPE Profile)
+       set(CMAKE_BUILD_TYPE Profile CACHE TYPE STRING FORCE)
+       set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg" CACHE TYPE STRING FORCE)
        set(profile)
 endif(profile)
 if(release)
@@ -57,8 +58,17 @@ if(debug)
        set(CMAKE_BUILD_TYPE Debug)
 endif(debug)
 
+if(shared)
+       set(library_type SHARED)
+       message(STATUS "building shared libraries")
+else(shared)
+       set(library_type STATIC)
+endif(shared)
 
 if(UNIX)
+       if(NOT quiet)
+               set(CMAKE_VERBOSE_MAKEFILE ON)
+       endif(NOT quiet)
        set(LYX_CXX_FLAGS -Wall)
        if(stdlib-debug)
                set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")