Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
path = extern/BAST
url = https://github.com/CLEARSY/BAST.git
branch = main
[submodule "extern/tinyxml2"]
path = extern/tinyxml2
url = https://github.com/leethomason/tinyxml2.git

14 changes: 5 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,16 @@ else()
set(PROJECT_IS_TOP_LEVEL FALSE)
endif()

foreach(submodule
"${PROJECT_SOURCE_DIR}/extern/BAST")
if(NOT EXISTS "${submodule}/CMakeLists.txt")
message(FATAL_ERROR "Submodule ${submodule} is missing: update submodules and try again.")
message(FATAL_ERROR "Command : git submodule update --init --recursive.")
endif()
endforeach(submodule)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeModules)

if(PROJECT_IS_TOP_LEVEL)
add_subdirectory(extern/tinyxml2)
endif(PROJECT_IS_TOP_LEVEL)

add_subdirectory(extern/BAST)
add_subdirectory(src)

if(PROJECT_IS_TOP_LEVEL)
include(CTest)
add_subdirectory(test)
endif()
endif(PROJECT_IS_TOP_LEVEL)
1 change: 1 addition & 0 deletions extern/tinyxml2
Submodule tinyxml2 added at 1dee28
5 changes: 3 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ project(POGLIB)
set(CMAKE_CXX_STANDARD 17)

include_directories(
${BASTLIB_SOURCE_DIR}
${BASTLIB_SOURCE_DIR}
${tinyxml2_SOURCE_DIR}
)

set(POGLIB_HEADERS pog.h pogXmlWriter.h)
set(POGLIB_SOURCES pog.cpp pogXmlWriter.cpp)

Expand Down
9 changes: 4 additions & 5 deletions test/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.10)

project(loadpog_test)

include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${POGLIB_SOURCE_DIR}
${BASTLIB_SOURCE_DIR}
${BASTLIB_SOURCE_DIR}
${tinyxml2_SOURCE_DIR}
)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

add_executable(loadpog loadpog.cpp)

get_target_property(LOADPOG_OUTPUT_DIRECTORY loadpog RUNTIME_OUTPUT_DIRECTORY)

target_link_libraries(loadpog PRIVATE POGLIB BAST_LIB)
target_link_libraries(loadpog PRIVATE POGLIB BAST_LIB tinyxml2::tinyxml2)
set(loadpog_EXE ${LOADPOG_OUTPUT_DIRECTORY}/loadpog${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "loadpog executable")
Loading