Another swing at cpack

This commit is contained in:
Linus Probert 2018-02-23 07:17:55 +01:00
parent 44fc5746fd
commit 988d0138b9
1 changed files with 24 additions and 18 deletions

View File

@ -169,32 +169,38 @@ if (WIN32)
)
endif (WIN32)
install(TARGETS breakhack
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_NAME "BreakHack")
set(CPACK_PACKAGE_VENDOR "OliveShark")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package)
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "BreakHack")
set(CPACK_PACKAGE_FILE_NAME "breakhack-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_CHECKSUM "MD5")
set(CPACK_INSTALL_CMAKE_PROJECTS ${PROJECT_BINARY_DIR} breakhack Release package)
if(UNIX)
set(CPACK_STRIP_FILES breakhack)
set(CPACK_SOURCE_STRIP_FILES "")
endif(UNIX)
set(CPACK_PACKAGE_EXECUTABLES breakhack "BreakHack")
include(CPack)
INSTALL(TARGETS breakhack
COMPONENT Release
RUNTIME DESTINATION bin
)
install(FILES assets.pack
INSTALL(FILES assets.pack
COMPONENT Release
DESTINATION bin
)
install(DIRECTORY data
INSTALL(DIRECTORY data
COMPONENT Release
DESTINATION bin
)
if (WIN32)
install(FILES ${DLL_FILES} DESTINATION bin)
INSTALL(FILES ${DLL_FILES} DESTINATION bin)
endif (WIN32)
if (WIN32)
set(CPACK_INSTALL_CMAKE_PROJECTS ${PROJECT_BINARY_DIR} breakhack Release package)
set(CPACK_PACKAGE_NAME "BreakHack")
set(CPACK_PACKAGE_VENDOR "OliveShark")
set(CPACK_PACKAGE_DIRECTORY "package")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_CHECKSUM "MD5")
set(CPACK_PACKAGE_EXECUTABLES breakhack)
include(cpack)
endif (WIN32)