Skip to content

Commit 7fa50d3

Browse files
author
THOMAS S. MANNER
committed
Updated cmake to install headers to ${CMAKE_BINARY_DIR}/include/cdg/.
1 parent 8d5ee7e commit 7fa50d3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ To build a single `.so` library file for `cppdigraph`:
1010
cd build
1111
cmake ../src
1212
make
13+
make install
1314

1415
### As a Developer
1516
To build the library and test environment for `cppdigraph`:
@@ -18,5 +19,8 @@ To build the library and test environment for `cppdigraph`:
1819
cd build
1920
cmake ..
2021
make
22+
make install
2123

22-
Once the test environment is compiled, you can run them with `ctest`. Tests are registered in `test/CMakeLists.txt` using the `add_test` directive. To see the stdout of the tests as they run, use `ctest -V`.
24+
Once the test environment is compiled, you can run them with `ctest`.
25+
Tests are registered in `test/CMakeLists.txt` using the `add_test` directive.
26+
To see the stdout of the tests as they run, use `ctest -V`.

src/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
1010
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
1111

1212
add_library (DiGraph SHARED digraph.cpp)
13+
set_target_properties(DiGraph PROPERTIES PUBLIC_HEADER "digraph.h;edge.h;node.h;relationship.h")
14+
INSTALL(
15+
TARGETS DiGraph
16+
LIBRARY DESTINATION ${CMAKE_BINARY_DIR}/lib
17+
PUBLIC_HEADER DESTINATION ${CMAKE_BINARY_DIR}/include/cdg
18+
)
1319

1420
# Set the linker language to C++ for the DiGraph target
1521
SET_TARGET_PROPERTIES(DiGraph PROPERTIES LINKER_LANGUAGE CXX)

0 commit comments

Comments
 (0)