diff options
Diffstat (limited to 'Tests/RunCMake/CPack/DEPENDENCIES.cmake')
-rw-r--r-- | Tests/RunCMake/CPack/DEPENDENCIES.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/DEPENDENCIES.cmake b/Tests/RunCMake/CPack/DEPENDENCIES.cmake new file mode 100644 index 0000000..0aef925 --- /dev/null +++ b/Tests/RunCMake/CPack/DEPENDENCIES.cmake @@ -0,0 +1,18 @@ +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp" + "int test_lib();") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp" + "#include \"test_lib.hpp\"\nint test_lib() {return 0;}") +add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp") + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" + "#include \"test_lib.hpp\"\nint main() {return test_lib();}") +add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") +target_link_libraries(test_prog test_lib) + +install(TARGETS test_prog DESTINATION foo COMPONENT applications) +install(TARGETS test_prog DESTINATION foo_auto COMPONENT applications_auto) +install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers) +install(TARGETS test_lib DESTINATION bas COMPONENT libs) +install(TARGETS test_lib DESTINATION bas_auto COMPONENT libs_auto) + +set(CPACK_PACKAGE_NAME "dependencies") |