Skip to content

Commit e45d315

Browse files
committed
Merge pull request #80 from bkloppenborg/cmake_additional_install
Adding install instructions for tests and examples.
2 parents f692f7c + 2ec8a32 commit e45d315

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,9 @@ IF(${BUILD_EXAMPLES})
7676
ENDIF()
7777

7878
## Install step
79-
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include)
79+
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include
80+
FILES_MATCHING
81+
PATTERN "*.h"
82+
PATTERN "*.hpp"
83+
PATTERN ".gitignore" EXCLUDE
84+
)

examples/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ MACRO(CREATE_EXAMPLES BACKEND)
1212
ADD_EXECUTABLE(${EXAMPLE_NAME} ${FNAME}.cpp)
1313
TARGET_LINK_LIBRARIES(${EXAMPLE_NAME} af${BACKEND} ${THREAD_LIB_FLAG})
1414
SET_TARGET_PROPERTIES(${EXAMPLE_NAME} PROPERTIES COMPILE_FLAGS -DAF_${DEF_NAME})
15+
16+
INSTALL(TARGETS ${EXAMPLE_NAME} DESTINATION arrayfire/examples)
1517
ENDFOREACH()
1618
ENDMACRO(CREATE_EXAMPLES)
1719

test/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ MACRO(CREATE_TESTS BACKEND)
1818
debug ${GTEST_DEBUG_LIB}
1919
debug ${GTEST_DEBUG_MAIN_LIB})
2020
SET_TARGET_PROPERTIES(${TEST_NAME} PROPERTIES COMPILE_FLAGS -DAF_${DEF_NAME})
21+
22+
INSTALL(TARGETS ${TEST_NAME} DESTINATION arrayfire/tests)
2123
ENDFOREACH()
2224
ENDMACRO(CREATE_TESTS)
2325

0 commit comments

Comments
 (0)