CMake/Tests/RunCMake/CPack/SOURCE_PACKAGE.cmake

10 lines
294 B
CMake

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
"int main() {return 0;}")
add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
install(TARGETS test_prog DESTINATION foo COMPONENT applications)
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set(CPACK_PACKAGE_NAME "source_package")