diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 616b406..bc36d23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ option(build_search "Build external search tools (doxysearch and doxyindexer) option(build_doc "Build user manual" OFF) option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF) option(use_libclang "Add support for libclang parsing." OFF) -option(qt_static "Link doxywizard with /MT in stead of /MD on windows" OFF) +option(win_static "Link with /MT in stead of /MD on windows" OFF) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(version) @@ -36,7 +36,6 @@ if (use_libclang) find_package(LibClang REQUIRED) endif() - if (${CMAKE_SYSTEM} MATCHES "Darwin") set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_CXX_FLAGS}") find_library(CORESERVICES_LIB CoreServices) @@ -81,6 +80,24 @@ if (${CUSTOM_LINK_DIR}) link_directories(${CUSTOM_LINK_DIR}) endif() +if (win_static) + set(CompilerFlags + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_MINSIZEREL + CMAKE_C_FLAGS_RELWITHDEBINFO) + foreach(CompilerFlag ${CompilerFlags}) + string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") + endforeach() +endif() + + add_subdirectory(libmd5) add_subdirectory(qtools) add_subdirectory(vhdlparser) |