From 08255875c1b144a9ce12d9a068f55763c99a10a5 Mon Sep 17 00:00:00 2001 From: Trygve Date: Tue, 7 May 2024 11:40:33 +0200 Subject: [PATCH] Added the argh library as a subproject --- .gitmodules | 3 +++ CMakeLists.txt | 17 ++++++++++++----- extern/argh | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 extern/argh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3f927f1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "extern/argh"] + path = extern/argh + url = https://github.com/adishavit/argh.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 4367b9c..0d05b6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,22 @@ +cmake_minimum_required(VERSION 3.20) + project( contour-creator LANGUAGES CXX) -find_package(GDAL CONFIG REQUIRED) - add_executable(${PROJECT_NAME} src/HeightMap.cpp src/CellMap.cpp src/main.cpp ) + +# Argh is a simple argrument parser +add_subdirectory(extern/argh) +target_link_libraries(${PROJECT_NAME} PRIVATE argh) + +# Gdal is used for geodata IO +find_package(GDAL CONFIG REQUIRED) +target_link_libraries(${PROJECT_NAME} PRIVATE GDAL::GDAL) + find_package(OpenMP) if(OpenMP_CXX_FOUND) target_link_libraries(${PROJECT_NAME} PUBLIC OpenMP::OpenMP_CXX) -endif() - -target_link_libraries(${PROJECT_NAME} GDAL::GDAL) \ No newline at end of file +endif() \ No newline at end of file diff --git a/extern/argh b/extern/argh new file mode 160000 index 0000000..431bf32 --- /dev/null +++ b/extern/argh @@ -0,0 +1 @@ +Subproject commit 431bf323acd3bb805483491ff277dac5d85772ad