--- CMakeLists.txt +++ CMakeLists.txt 2024-06-15 12:16:29.000000000 +0800 @@ -1,9 +1,7 @@ cmake_minimum_required(VERSION 3.12) cmake_policy(VERSION ${CMAKE_VERSION}) -## The CMAKE_OSX_DEPLOYMENT_TARGET must be set before project(), so don't move the following line further down. -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) -if(NOT CMAKE_BUILD_TYPE) +if(NOT CMAKE_BUILD_TYPE) # set default build type to RelWithDebInfo, we never supported multi config generators, therefore this is fine set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) endif() @@ -50,9 +48,6 @@ core_find_git_rev(RELEASE_IDENTIFIER) string(TIMESTAMP PACKAGE_TIMESTAMP "%Y%m%d.%H%M" UTC) -include(TargetArch) -target_architecture(PACKAGE_ARCH) - configure_file(cmake/VERSION.in VERSION) configure_file( @@ -90,7 +85,6 @@ add_library(backtrace INTERFACE) target_include_directories(backtrace INTERFACE ${Backtrace_INCLUDE_DIRS}) target_link_libraries(backtrace INTERFACE ${Backtrace_LIBRARIES}) - target_link_options(backtrace INTERFACE $<$>,$,$>>:-rdynamic>) add_library(Backtrace::backtrace ALIAS backtrace) endif (Backtrace_FOUND) @@ -128,14 +122,6 @@ string(REPLACE "-framework;" "-framework " libs "${libs}") # message(STATUS "PkgConfig::ExternalModules::INTERFACE_LINK_LIBRARIES fixed: ${libs}") set_target_properties(PkgConfig::ExternalModules PROPERTIES INTERFACE_LINK_LIBRARIES "${libs}") - - - if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13") - # fix broken framework flags from pkgconfig - get_target_property(opts PkgConfig::ExternalModules INTERFACE_LINK_OPTIONS) - string(REPLACE "-framework;" "SHELL:-framework " opts "${opts}") - set_target_properties(PkgConfig::ExternalModules PROPERTIES INTERFACE_LINK_OPTIONS "${opts}") - endif () endif () find_package(ZLIB REQUIRED) @@ -201,9 +187,6 @@ GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_18 $<$:X11_ENABLED> - ) -target_link_options(external_modules INTERFACE - $<$>,$,$>>:-rdynamic> ) add_library(xoj::external_modules ALIAS external_modules) @@ -402,32 +385,6 @@ set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") set(CPACK_STRIP_FILES ON) # Debian packages must be stripped from debug messages, so lintian doesn't complain -# .deb package options -set(CPACK_DEBIAN_PACKAGE_RELEASE 2) -set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PROJECT_VERSION}") -set(CPACK_DEBIAN_PACKAGE_SECTION "graphics") -set(CPACK_DEBIAN_PACKAGE_DEPENDS - "libglib2.0-0 (>= 2.32), libgtk-3-0 (>= 3.18), libpoppler-glib8 (>= 0.41.0), libxml2 (>= 2.0.0), libportaudiocpp0 (>= 12), libsndfile1 (>= 1.0.25), liblua5.3-0, libzip4 (>= 1.0.1) | libzip5, zlib1g, libc6") -set(CPACK_DEBIAN_PACKAGE_SUGGESTS "texlive-base, texlive-latex-extra") # Latex tool -# Use debian's arch scheme; we only care about x86/amd64 for now but feel free to add more -if (${PACKAGE_ARCH} STREQUAL "x86_64") - set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") -endif () - -if (CPACK_GENERATOR MATCHES "DEB") - message("Preparing documentation for DEB package") - add_custom_target(package_documentation ALL) - - #Compress changelog and save it as share/doc/xournalpp/changelog.Debian.gz - add_custom_command(TARGET package_documentation PRE_BUILD - COMMAND gzip -c -9 -n "${PROJECT_SOURCE_DIR}/debian/changelog" > "changelog.Debian.gz" VERBATIM) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/changelog.Debian.gz" DESTINATION "share/doc/xournalpp/") - - message("Install copyright for DEB package") - #Copy copyright to share/doc/xournalpp/copyright - install(FILES "${PROJECT_SOURCE_DIR}/debian/copyright" DESTINATION "share/doc/xournalpp/") -endif () - if (NOT DEFINED CPACK_GENERATOR) set(CPACK_GENERATOR "TGZ") endif ()