diff --git a/CMakeLists.txt b/CMakeLists.txt index be7cf27..2d499ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,11 +32,13 @@ add_executable(conan-gui ${win_app_flag} src/main.cpp) target_link_libraries(conan-gui PRIVATE conangui::core conangui::qt) # Installation ########################################## -install(TARGETS conan-gui DESTINATION . ) +install(TARGETS conan-gui DESTINATION . COMPONENT applications) -install(SCRIPT deploy/deploy_qt.cmake) +install(SCRIPT deploy/deploy_qt.cmake ) +install(DIRECTORY ${CMAKE_BINARY_DIR}/qt_deploy/ DESTINATION . COMPONENT applications) set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .) +set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT applications) include(InstallRequiredSystemLibraries) # test ################################################### @@ -70,3 +72,37 @@ conangui_add_test( COV src interfaces) + +# +# CPACK macros below here +# +set (CPACK_PACKAGE_NAME ${PROJECT_NAME}) +set (CPACK_PACKAGE_VENDOR "davidtazy") +set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "desktop interface on conan") +set (CPACK_PACKAGE_VERSION "0.0.0") +set (CPACK_PACKAGE_VERSION_MAJOR "0") +set (CPACK_PACKAGE_VERSION_MINOR "0") +set (CPACK_PACKAGE_VERSION_PATCH "0") +set (CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}) + +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license") +set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/src/logo-conan.ico") + +# Define components and their display names +set (CPACK_COMPONENTS_ALL applications ) +set (CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "conan-gui Applications") + +# Human readable component descriptions +set (CPACK_COMPONENT_APPLICATIONS_DESCRIPTION + "desktop interface on conan") + +# Define groups +set(CPACK_COMPONENT_APPLICATIONS_GROUP "Runtime") + + +# Define NSIS installation types +set(CPACK_ALL_INSTALL_TYPES Full ) +set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full) + +# Must be after the last CPACK macros +include(CPack) diff --git a/deploy/deploy_qt.cmake b/deploy/deploy_qt.cmake index 9ac42ad..766ca9f 100644 --- a/deploy/deploy_qt.cmake +++ b/deploy/deploy_qt.cmake @@ -1,8 +1,8 @@ -message("deploy qt binaries to ${CMAKE_INSTALL_PREFIX}") +message("deploy qt binaries to ${CMAKE_BINARY_DIR}/qt_deploy") find_package(PythonInterp REQUIRED) execute_process(COMMAND - ${PYTHON_EXECUTABLE} deploy.py ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX} + ${PYTHON_EXECUTABLE} deploy.py ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/qt_deploy WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) \ No newline at end of file