mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-28 06:10:55 +08:00
Merge pull request #90 from jippeholwerda/master
Put CMakeLists.txt in the project root.
This commit is contained in:
commit
53bc83cae7
@ -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()
|
Loading…
x
Reference in New Issue
Block a user