summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2018-01-29 11:11:23 -0800
committerGitHub <noreply@github.com>2018-01-29 11:11:23 -0800
commit9bb468b3a960421b2ae3a3f232fbda477f42d2f4 (patch)
treef97c19af95d402216905f77ffe22ca5f5d7e8d2c
parent195494186e18b6c9bb257fb44ce27019c398758d (diff)
parent7fcfb72dcdc03c34bded22348dfd4230cce61540 (diff)
Merge pull request #179 from mathstuf/cmake-touchups
Cmake touchups
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbae2f1..cc1961d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
-project(pugixml)
-
cmake_minimum_required(VERSION 2.8.12)
+project(pugixml)
+
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
option(BUILD_TESTS "Build tests" OFF)
option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF)
@@ -28,7 +28,7 @@ include(GNUInstallDirs)
mark_as_advanced(CLEAR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
set(HEADERS src/pugixml.hpp src/pugiconfig.hpp)
-set(SOURCES ${HEADERS} src/pugixml.cpp)
+set(SOURCES src/pugixml.cpp)
if(DEFINED BUILD_DEFINES)
foreach(DEFINE ${BUILD_DEFINES})
@@ -37,9 +37,9 @@ if(DEFINED BUILD_DEFINES)
endif()
if(BUILD_SHARED_LIBS)
- add_library(pugixml SHARED ${SOURCES})
+ add_library(pugixml SHARED ${HEADERS} ${SOURCES})
else()
- add_library(pugixml STATIC ${SOURCES})
+ add_library(pugixml STATIC ${HEADERS} ${SOURCES})
endif()
# Export symbols for shared library builds