From 806c75652aa953f1eacb233330b0450a5d1a7e02 Mon Sep 17 00:00:00 2001 From: Jippe Holwerda Date: Thu, 25 Feb 2016 19:30:03 +0100 Subject: [PATCH 1/2] Put CMakeLists.txt in the project root. Having CMakeLists.txt in the project root makes it so much easier to use pugixml as an external dependency in another CMake project. --- scripts/CMakeLists.txt => CMakeLists.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/CMakeLists.txt => CMakeLists.txt (100%) diff --git a/scripts/CMakeLists.txt b/CMakeLists.txt similarity index 100% rename from scripts/CMakeLists.txt rename to CMakeLists.txt From 4469a329707c62736e84bf273d8026e19ad184d2 Mon Sep 17 00:00:00 2001 From: Jippe Holwerda Date: Thu, 25 Feb 2016 20:38:07 +0100 Subject: [PATCH 2/2] Change paths according to new CMakeLists.txt location. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb16870..d33750a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,8 @@ endif() 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(HEADERS src/pugixml.hpp src/pugiconfig.hpp) +set(SOURCES ${HEADERS} src/pugixml.cpp) if(DEFINED BUILD_DEFINES) foreach(DEFINE ${BUILD_DEFINES}) @@ -57,11 +57,11 @@ install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml) if(BUILD_TESTS) - file(GLOB TEST_SOURCES ../tests/*.cpp) - file(GLOB FUZZ_SOURCES ../tests/fuzz_*.cpp) + file(GLOB TEST_SOURCES tests/*.cpp) + file(GLOB FUZZ_SOURCES tests/fuzz_*.cpp) list(REMOVE_ITEM TEST_SOURCES ${FUZZ_SOURCES}) add_executable(check ${TEST_SOURCES}) target_link_libraries(check pugixml) - add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..) + add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) endif() \ No newline at end of file