mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-28 14:48:43 +08:00
scripts: Fix default value for STATIC_CRT option
Also refactor to use the same case and run after common options.
This commit is contained in:
parent
6a22a28730
commit
03b1b6a5c3
@ -1,10 +1,15 @@
|
|||||||
project(pugixml)
|
project(pugixml)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
IF (MSVC)
|
|
||||||
|
|
||||||
option(STATIC_CRT "Use static CRT libraries" ON)
|
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
|
||||||
|
option(BUILD_TESTS "Build tests" OFF)
|
||||||
|
set(BUILD_DEFINES "" CACHE STRING "Build defines")
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
option(STATIC_CRT "Use static CRT libraries" OFF)
|
||||||
|
|
||||||
|
# Rewrite command line flags to use /MT if necessary
|
||||||
if(STATIC_CRT)
|
if(STATIC_CRT)
|
||||||
foreach(flag_var
|
foreach(flag_var
|
||||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||||
@ -14,11 +19,7 @@ IF (MSVC)
|
|||||||
endif(${flag_var} MATCHES "/MD")
|
endif(${flag_var} MATCHES "/MD")
|
||||||
endforeach(flag_var)
|
endforeach(flag_var)
|
||||||
endif()
|
endif()
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
|
|
||||||
option(BUILD_TESTS "Build tests" OFF)
|
|
||||||
set(BUILD_DEFINES "" CACHE STRING "Build defines")
|
|
||||||
|
|
||||||
# Pre-defines standard install locations on *nix systems.
|
# Pre-defines standard install locations on *nix systems.
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user