CMakeLists.txt: No need to specify shared and static versions of add_library()
This commit is contained in:
parent
c12889f7cc
commit
9f20c3a75a
@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.0)
|
|||||||
|
|
||||||
project(pugixml VERSION 1.9)
|
project(pugixml VERSION 1.9)
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
|
|
||||||
option(BUILD_TESTS "Build tests" OFF)
|
option(BUILD_TESTS "Build tests" OFF)
|
||||||
option(USE_VERSIONED_LIBDIR "Use a private subdirectory to install the headers and libs" OFF)
|
option(USE_VERSIONED_LIBDIR "Use a private subdirectory to install the headers and libs" OFF)
|
||||||
option(USE_POSTFIX "Use separate postfix for each configuration to make sure you can install multiple build outputs" OFF)
|
option(USE_POSTFIX "Use separate postfix for each configuration to make sure you can install multiple build outputs" OFF)
|
||||||
@ -37,11 +36,7 @@ if(DEFINED BUILD_DEFINES)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
add_library(pugixml ${HEADERS} ${SOURCES})
|
||||||
add_library(pugixml SHARED ${HEADERS} ${SOURCES})
|
|
||||||
else()
|
|
||||||
add_library(pugixml STATIC ${HEADERS} ${SOURCES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Export symbols for shared library builds
|
# Export symbols for shared library builds
|
||||||
if(BUILD_SHARED_LIBS AND MSVC)
|
if(BUILD_SHARED_LIBS AND MSVC)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user