From 19918509f7f09385fa1c4b9ab018f7a5d331c59e Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Fri, 27 Dec 2013 10:29:56 +1100 Subject: [PATCH] Issue #15 Added install targets for the examples and unit tests. --- example/simple/CMakeLists.txt | 10 ++++++++++ example/simplecpu/CMakeLists.txt | 10 ++++++++++ example/trivial/CMakeLists.txt | 10 ++++++++++ test/unit/CMakeLists.txt | 5 +++++ 4 files changed, 35 insertions(+) diff --git a/example/simple/CMakeLists.txt b/example/simple/CMakeLists.txt index 1c4e1ce..b004660 100644 --- a/example/simple/CMakeLists.txt +++ b/example/simple/CMakeLists.txt @@ -15,6 +15,16 @@ set_property( PROPERTY COMPILE_DEFINITIONS PCP_CPP_NO_BOOST ) +install( + TARGETS "pmda${PROJECT_NAME}" "pmda${PROJECT_NAME}-noboost" + RUNTIME DESTINATION bin +) + +install( + FILES "${PROJECT_NAME}.cpp" + DESTINATION share/doc/pcp-cpp +) + # Enable (and stop on) compiler warnings. include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wall HAVE_WALL) diff --git a/example/simplecpu/CMakeLists.txt b/example/simplecpu/CMakeLists.txt index 7a0130f..5cbb8b1 100644 --- a/example/simplecpu/CMakeLists.txt +++ b/example/simplecpu/CMakeLists.txt @@ -15,6 +15,16 @@ set_property( PROPERTY COMPILE_DEFINITIONS PCP_CPP_NO_BOOST ) +install( + TARGETS "pmda${PROJECT_NAME}" "pmda${PROJECT_NAME}-noboost" + RUNTIME DESTINATION bin +) + +install( + FILES "${PROJECT_NAME}.cpp" + DESTINATION share/doc/pcp-cpp +) + # Enable (and stop on) compiler warnings. include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wall HAVE_WALL) diff --git a/example/trivial/CMakeLists.txt b/example/trivial/CMakeLists.txt index eeb61f4..1d13864 100644 --- a/example/trivial/CMakeLists.txt +++ b/example/trivial/CMakeLists.txt @@ -15,6 +15,16 @@ set_property( PROPERTY COMPILE_DEFINITIONS PCP_CPP_NO_BOOST ) +install( + TARGETS "pmda${PROJECT_NAME}" "pmda${PROJECT_NAME}-noboost" + RUNTIME DESTINATION bin +) + +install( + FILES "${PROJECT_NAME}.cpp" + DESTINATION share/doc/pcp-cpp +) + # Enable (and stop on) compiler warnings. include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wall HAVE_WALL) diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index a5627d9..8c981d8 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -92,3 +92,8 @@ target_link_libraries( # Add a custom "check" target a la GNU's Standard Targets for Users. add_custom_target(check COMMAND test DEPENDS test) + +install( + TARGETS test + DESTINATION bin/pcp-pmda-cpp +)