Skip to content

Commit

Permalink
Attempt to fix Linux packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Aug 5, 2024
1 parent 9d99d97 commit 67bca56
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ else()
add_compile_options($<$<CONFIG:Release>:-fno-rtti>)
endif()

find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()
set(CMAKE_AUTORCC ON)

# build KDGpu --------------------
find_package(spdlog CONFIG REQUIRED)

find_package(Vulkan)
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
add_library(vulkan-memory-allocator::vulkan-memory-allocator ALIAS GPUOpen::VulkanMemoryAllocator)

set(PROJECT_VERSION "0.4.4")
set(PROJECT_VERSION "0.6.0")
include(FeatureSummary)
add_compile_definitions(KDGPU_STATIC_DEFINE)
add_subdirectory(libs/KDGpu/src/KDGpu)
add_subdirectory(libs/KDGpu/src/KDGpu EXCLUDE_FROM_ALL)

# setup version -------------------------
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -195,10 +199,6 @@ else()
add_compile_options(-Wall)
endif()

find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()
set(CMAKE_AUTORCC ON)

qt_add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES
WIN32_EXECUTABLE TRUE
Expand Down Expand Up @@ -327,19 +327,16 @@ set(CPACK_PACKAGE_CONTACT ${CPACK_PACKAGE_HOMEPAGE_URL})
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/src/images/icon.ico")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")

set(CPACK_COMPONENT_APPLICATION_HIDDEN TRUE)
set(CPACK_COMPONENT_APPLICATION_REQUIRED TRUE)

if(VERSION MATCHES "^[0-9]+\.[0-9]+\.[0-9]+")
string(REGEX MATCHALL "[0-9]+" VERSION_LIST "${VERSION}")
list(GET VERSION_LIST 0 CPACK_PACKAGE_VERSION_MAJOR)
list(GET VERSION_LIST 1 CPACK_PACKAGE_VERSION_MINOR)
list(GET VERSION_LIST 2 CPACK_PACKAGE_VERSION_PATCH)
endif()

# do not pack files installed by KDGpu
set(CPACK_COMPONENT_APPLICATION_HIDDEN TRUE)
set(CPACK_COMPONENT_APPLICATION_REQUIRED TRUE)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL Application Samples Themes)

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CPACK_GENERATOR TGZ)

Expand Down

0 comments on commit 67bca56

Please sign in to comment.