Lines 1-8
Link Here
|
1 |
--- CMakeLists.txt.orig 2016-11-27 15:48:03.000000000 -0500 |
1 |
--- CMakeLists.txt.orig 2018-04-04 14:53:16 UTC |
2 |
+++ CMakeLists.txt 2017-09-14 18:31:07.892853000 -0400 |
2 |
+++ CMakeLists.txt |
3 |
@@ -2,7 +2,8 @@ |
3 |
@@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 2.8.12) |
4 |
|
4 |
|
5 |
cmake_minimum_required(VERSION 2.6) |
5 |
project(pugixml) |
6 |
|
6 |
|
7 |
-option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) |
7 |
-option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) |
8 |
+option(BUILD_SHARED_LIBS "Build shared library" OFF) |
8 |
+option(BUILD_SHARED_LIBS "Build shared library" OFF) |
Lines 10-26
Link Here
|
10 |
option(BUILD_TESTS "Build tests" OFF) |
10 |
option(BUILD_TESTS "Build tests" OFF) |
11 |
option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF) |
11 |
option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF) |
12 |
|
12 |
|
13 |
@@ -38,28 +39,27 @@ |
13 |
@@ -38,9 +39,15 @@ endif() |
14 |
|
14 |
|
15 |
if(BUILD_SHARED_LIBS) |
15 |
if(BUILD_SHARED_LIBS) |
16 |
add_library(pugixml SHARED ${SOURCES}) |
16 |
add_library(pugixml SHARED ${HEADERS} ${SOURCES}) |
17 |
-else() |
17 |
-else() |
18 |
- add_library(pugixml STATIC ${SOURCES}) |
18 |
- add_library(pugixml STATIC ${HEADERS} ${SOURCES}) |
19 |
+ set_target_properties(pugixml PROPERTIES VERSION 1.8 SOVERSION 1) |
|
|
20 |
+ install(TARGETS pugixml EXPORT pugixml-config |
21 |
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
22 |
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
23 |
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
24 |
endif() |
19 |
endif() |
25 |
+if(BUILD_STATIC_LIBS) |
20 |
+if(BUILD_STATIC_LIBS) |
26 |
+ add_library(pugixml_static STATIC ${SOURCES}) |
21 |
+ add_library(pugixml_static STATIC ${SOURCES}) |
Lines 31-62
Link Here
|
31 |
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
26 |
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
32 |
+endif() |
27 |
+endif() |
33 |
|
28 |
|
34 |
# Enable C++11 long long for compilers that are capable of it |
29 |
# Export symbols for shared library builds |
35 |
if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;") |
30 |
if(BUILD_SHARED_LIBS AND MSVC) |
36 |
target_compile_features(pugixml PUBLIC cxx_long_long_type) |
31 |
@@ -54,11 +61,6 @@ endif() |
37 |
endif() |
|
|
38 |
|
32 |
|
39 |
-set_target_properties(pugixml PROPERTIES VERSION 1.8 SOVERSION 1) |
33 |
set_target_properties(pugixml PROPERTIES VERSION 1.9 SOVERSION 1) |
40 |
-get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) |
34 |
get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) |
41 |
- |
35 |
- |
42 |
-if(BUILD_PKGCONFIG) |
36 |
-if(BUILD_PKGCONFIG) |
43 |
- # Install library into its own directory under LIBDIR |
37 |
- # Install library into its own directory under LIBDIR |
44 |
- set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING}) |
38 |
- set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING}) |
45 |
-endif() |
39 |
-endif() |
46 |
- |
|
|
47 |
-install(TARGETS pugixml EXPORT pugixml-config |
48 |
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX} |
49 |
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX} |
50 |
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
51 |
-install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}) |
52 |
+install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |
53 |
install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml) |
54 |
|
40 |
|
55 |
if(BUILD_PKGCONFIG) |
41 |
target_include_directories(pugixml PUBLIC |
56 |
@@ -75,4 +75,4 @@ |
42 |
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src> |
57 |
add_executable(check ${TEST_SOURCES}) |
|
|
58 |
target_link_libraries(check pugixml) |
59 |
add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
60 |
-endif() |
61 |
\ No newline at end of file |
62 |
+endif() |