- Sidequest: Clean up header-only library dependencies with cmake.

This commit is contained in:
Ian Roddis
2021-08-13 12:43:39 -03:00
parent de8025e0f9
commit 71344b3a2a
12 changed files with 82 additions and 48 deletions

15
cmake/argparse.cmake Normal file
View File

@@ -0,0 +1,15 @@
include(ExternalProject)
project(argparse)
ExternalProject_Add(${PROJECT_NAME}-external
GIT_REPOSITORY https://github.com/p-ranav/argparse.git
GIT_TAG "v2.1"
GIT_SHALLOW TRUE
SOURCE_DIR ${THIRD_PARTY_DIR}/${PROJECT_NAME}
BUILD_COMMAND ""
INSTALL_COMMAND ""
CONFIGURE_COMMAND "")
add_library(${PROJECT_NAME} INTERFACE)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}-external)
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${THIRD_PARTY_DIR}/${PROJECT_NAME}/include)