File tree 4 files changed +56
-0
lines changed 4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1
1
[submodule "cmake "]
2
2
path = cmake
3
3
url = https://github.com/jrl-umi3218/jrl-cmakemodules
4
+ [submodule "src/third-party/expected "]
5
+ path = src/third-party/expected
6
+ url = [email protected] :TartanLlama/expected.git
Original file line number Diff line number Diff line change @@ -411,6 +411,7 @@ function(create_library)
411
411
endif ()
412
412
target_link_libraries (${PROJECT_NAME} PUBLIC proxsuite-nlp::proxsuite-nlp)
413
413
target_link_libraries (${PROJECT_NAME} PUBLIC fmt::fmt)
414
+ target_link_libraries (${PROJECT_NAME} PUBLIC aligator_third_party)
414
415
# set the install-tree include dirs
415
416
# used by dependent projects to consume this target
416
417
target_include_directories (
@@ -438,6 +439,7 @@ function(create_library)
438
439
endforeach ()
439
440
endfunction ()
440
441
442
+ add_subdirectory (src/third-party)
441
443
create_library()
442
444
443
445
ADD_HEADER_GROUP(LIB_HEADERS)
Original file line number Diff line number Diff line change
1
+ add_library (aligator_third_party INTERFACE )
2
+
3
+ # Install third-party library to aligator's installed include and lib dirs.
4
+ function (aligator_install_third_party target )
5
+ set (
6
+ THIRD_PARTY_INSTALL_INCLUDEDIR
7
+ ${CMAKE_INSTALL_INCLUDEDIR} /${PROJECT_NAME} /third-party
8
+ )
9
+ cmake_parse_arguments (
10
+ "EXT"
11
+ ""
12
+ "INCLUDE_DIR;HEADER_DESTINATION"
13
+ "HEADER_FILES"
14
+ ${ARGN}
15
+ )
16
+ install (
17
+ TARGETS ${target}
18
+ EXPORT ${TARGETS_EXPORT_NAME}
19
+ PUBLIC_HEADER DESTINATION ${THIRD_PARTY_INSTALL_INCLUDEDIR}
20
+ )
21
+ if (EXT_INCLUDE_DIR)
22
+ install (
23
+ DIRECTORY ${EXT_INCLUDE_DIR}
24
+ DESTINATION ${THIRD_PARTY_INSTALL_INCLUDEDIR}
25
+ FILES_MATCHING
26
+ REGEX ".*\\ .(h|hpp|hxx)$"
27
+ )
28
+ endif ()
29
+ # install individual header files
30
+ if (EXT_HEADER_FILES)
31
+ foreach (file ${EXT_HEADER_FILES} )
32
+ install (
33
+ FILES ${file}
34
+ DESTINATION ${THIRD_PARTY_INSTALL_INCLUDEDIR} /${EXT_HEADER_DESTINATION}
35
+ )
36
+ endforeach ()
37
+ endif ()
38
+ endfunction ()
39
+
40
+ add_library (expected INTERFACE )
41
+ target_include_directories (
42
+ expected
43
+ INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /expected/include >
44
+ )
45
+ aligator_install_third_party(expected INCLUDE_DIR
46
+ ${CMAKE_CURRENT_SOURCE_DIR} /expected/include /tl
47
+ )
48
+ target_link_libraries (aligator_third_party INTERFACE expected)
49
+
50
+ install (TARGETS aligator_third_party EXPORT ${TARGETS_EXPORT_NAME} )
You can’t perform that action at this time.
0 commit comments