Path: blob/main/editors/diamond/files/patch-src_CMakeLists.txt
18157 views
--- src/CMakeLists.txt.orig 2021-01-28 22:43:22 UTC1+++ src/CMakeLists.txt2@@ -120,6 +120,8 @@ target_link_libraries(Diamond3CopperSpice::CsNetwork4)56+set(install_resource_dir ${CMAKE_INSTALL_DATADIR}/copperspice/diamond)7+8if (CMAKE_SYSTEM_NAME MATCHES "Darwin")9set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond)1011@@ -160,7 +162,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")12)1314elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeBSD|NetBSD|DragonFly)")15- set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond)16+ set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond-cs)1718find_package(PkgConfig)19pkg_check_modules(Hunspell IMPORTED_TARGET hunspell)20@@ -169,8 +171,9 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeB21PRIVATE22PkgConfig::Hunspell23)24+ target_compile_definitions(Diamond PRIVATE DIAMOND_SHARE_DIR="${CMAKE_INSTALL_PREFIX}/${install_resource_dir}")2526- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.png DESTINATION .)27+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.png DESTINATION ${install_resource_dir})2829elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")3031@@ -198,28 +201,21 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")32install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.ico DESTINATION .)33endif()3435-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/syntax/ DESTINATION syntax)36+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/syntax/ DESTINATION ${install_resource_dir}/syntax)3738# installs English by default39-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.aff DESTINATION dictionary)40-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.dic DESTINATION dictionary)41+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.aff DESTINATION ${install_resource_dir}/dictionary)42+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.dic DESTINATION ${install_resource_dir}/dictionary)4344-# will not overwrite dictionary/userDict.txt45-install(CODE "46- if (NOT EXISTS \"${CMAKE_INSTALL_PREFIX}/dictionary/userDict.txt \")47- file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/userDict.txt\" DESTINATION \"${CMAKE_INSTALL_PREFIX}/dictionary\")48- endif()49-")50-51if (CMAKE_SYSTEM_NAME MATCHES "Darwin")52install(TARGETS Diamond DESTINATION ../MacOS)53else()54- install(TARGETS Diamond DESTINATION .)55+ install(TARGETS Diamond)56endif()5758-cs_copy_library(CsCore)59-cs_copy_library(CsGui)60-cs_copy_library(CsNetwork)61+# cs_copy_library(CsCore)62+# cs_copy_library(CsGui)63+# cs_copy_library(CsNetwork)6465if (CMAKE_SYSTEM_NAME MATCHES "Darwin")66# copy required plugins to the bundle67@@ -227,6 +223,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")68cs_copy_plugins(CsPrinterDriver ../plugins)69else()70# installs required plugins71- cs_copy_plugins(CsGui)72- cs_copy_plugins(CsPrinterDriver)73+ # cs_copy_plugins(CsGui)74+ # cs_copy_plugins(CsPrinterDriver)75endif()767778