|
1 | 1 | cmake_minimum_required(VERSION "3.12") |
2 | 2 |
|
3 | | -project("spackexample" VERSION 0.1.0) |
| 3 | +project("spackexample" VERSION 0.2.0) |
4 | 4 |
|
5 | | -# find_package(Boost |
6 | | -# 1.65.1 |
7 | | -# REQUIRED |
8 | | -# filesystem |
9 | | -# ) |
| 5 | +find_package(Boost |
| 6 | + 1.65.1 |
| 7 | + REQUIRED |
| 8 | + filesystem |
| 9 | + ) |
10 | 10 |
|
11 | 11 | # find_package(yaml-cpp |
12 | 12 | # 0.7.0 |
13 | 13 | # REQUIRED |
14 | 14 | # ) |
15 | 15 |
|
16 | | -# add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp) |
| 16 | +add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp) # yamlParser/yamlParser.cpp) |
17 | 17 |
|
18 | | -# set_target_properties(spackexamplelib |
19 | | -# PROPERTIES |
20 | | -# PUBLIC_HEADER filesystem/filesystem.hpp |
21 | | -# PUBLIC_HEADER flatset/flatset.hpp |
| 18 | +set_target_properties(spackexamplelib |
| 19 | + PROPERTIES |
| 20 | + PUBLIC_HEADER filesystem/filesystem.hpp |
| 21 | + PUBLIC_HEADER flatset/flatset.hpp |
22 | 22 | # PUBLIC_HEADER yamlParser/yamlParser.hpp |
23 | | -# ) |
| 23 | + ) |
24 | 24 |
|
25 | 25 | # include_directories(${YAML_CPP_INCLUDE_DIR}) |
26 | 26 |
|
27 | 27 | add_executable(spackexample main.cpp) |
28 | 28 |
|
29 | | -# target_link_libraries(spackexample spackexamplelib) |
30 | | -# target_link_libraries(spackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES}) |
| 29 | +target_link_libraries(spackexample spackexamplelib) |
| 30 | +target_link_libraries(spackexamplelib Boost::filesystem) # ${YAML_CPP_LIBRARIES}) |
31 | 31 |
|
32 | | -# target_include_directories(spackexamplelib |
33 | | -# PRIVATE |
34 | | -# ${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib |
35 | | -# PUBLIC |
36 | | -# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib> |
37 | | -# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/spackexamplelib> |
38 | | -# ) |
| 32 | +target_include_directories(spackexamplelib |
| 33 | + PRIVATE |
| 34 | + ${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib |
| 35 | + PUBLIC |
| 36 | + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib> |
| 37 | + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/spackexamplelib> |
| 38 | + ) |
39 | 39 |
|
40 | 40 | # Create install targets |
41 | 41 | include(GNUInstallDirs) |
42 | | -install(TARGETS spackexample |
43 | | -# install(TARGETS spackexample spackexamplelib |
| 42 | +install(TARGETS spackexample spackexamplelib |
44 | 43 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
45 | 44 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
46 | 45 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
|
0 commit comments