Skip to content

Commit 382917d

Browse files
authored
Make tclap findable by guix.
1 parent 628c469 commit 382917d

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,26 @@ set(CMAKE_CXX_EXTENSIONS OFF)
1010

1111
# --- CPM ---
1212
include(cmake/CPM.cmake)
13-
CPMFindPackage(
14-
NAME tclap
15-
GIT_REPOSITORY https://git.code.sf.net/p/tclap/code
16-
VERSION 1.4.0
17-
GIT_TAG 81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2
18-
DOWNLOAD_ONLY YES
19-
)
20-
if(tclap_ADDED AND NOT TARGET tclap)
13+
if(GUIX_BUILD)
14+
find_path(_tclap_include UnlabeledValueArg.h PATH_SUFFIXES tclap REQUIRED)
2115
add_library(tclap INTERFACE IMPORTED)
2216
target_include_directories(
23-
tclap SYSTEM INTERFACE ${tclap_SOURCE_DIR}/include
17+
tclap SYSTEM INTERFACE ${_tclap_include} ${_tclap_include}/..
18+
)
19+
else()
20+
CPMFindPackage(
21+
NAME tclap
22+
GIT_REPOSITORY https://git.code.sf.net/p/tclap/code
23+
GIT_TAG 81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2
24+
VERSION 1.4.0
25+
DOWNLOAD_ONLY YES
2426
)
27+
if(tclap_ADDED)
28+
add_library(tclap INTERFACE IMPORTED)
29+
target_include_directories(
30+
tclap SYSTEM INTERFACE ${tclap_SOURCE_DIR}/include
31+
)
32+
endif()
2533
endif()
2634

2735
set(VTK_COMPONENTS IOXML)

0 commit comments

Comments
 (0)