blob: d4f059428f38ffa627e988e2cae255587542cb8d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
--- src/CMakeLists.txt.orig 2021-01-28 22:43:22 UTC
+++ src/CMakeLists.txt
@@ -120,6 +120,8 @@ target_link_libraries(Diamond
CopperSpice::CsNetwork
)
+set(install_resource_dir ${CMAKE_INSTALL_DATADIR}/copperspice/diamond)
+
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond)
@@ -160,7 +162,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
)
elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeBSD|NetBSD|DragonFly)")
- set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond)
+ set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond-cs)
find_package(PkgConfig)
pkg_check_modules(Hunspell IMPORTED_TARGET hunspell)
@@ -169,8 +171,9 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeB
PRIVATE
PkgConfig::Hunspell
)
+ target_compile_definitions(Diamond PRIVATE DIAMOND_SHARE_DIR="${CMAKE_INSTALL_PREFIX}/${install_resource_dir}")
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.png DESTINATION .)
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.png DESTINATION ${install_resource_dir})
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
@@ -198,28 +201,21 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.ico DESTINATION .)
endif()
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/syntax/ DESTINATION syntax)
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/syntax/ DESTINATION ${install_resource_dir}/syntax)
# installs English by default
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.aff DESTINATION dictionary)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.dic DESTINATION dictionary)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.aff DESTINATION ${install_resource_dir}/dictionary)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.dic DESTINATION ${install_resource_dir}/dictionary)
-# will not overwrite dictionary/userDict.txt
-install(CODE "
- if (NOT EXISTS \"${CMAKE_INSTALL_PREFIX}/dictionary/userDict.txt \")
- file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/userDict.txt\" DESTINATION \"${CMAKE_INSTALL_PREFIX}/dictionary\")
- endif()
-")
-
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
install(TARGETS Diamond DESTINATION ../MacOS)
else()
- install(TARGETS Diamond DESTINATION .)
+ install(TARGETS Diamond)
endif()
-cs_copy_library(CsCore)
-cs_copy_library(CsGui)
-cs_copy_library(CsNetwork)
+# cs_copy_library(CsCore)
+# cs_copy_library(CsGui)
+# cs_copy_library(CsNetwork)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
# copy required plugins to the bundle
@@ -227,6 +223,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
cs_copy_plugins(CsPrinterDriver ../plugins)
else()
# installs required plugins
- cs_copy_plugins(CsGui)
- cs_copy_plugins(CsPrinterDriver)
+ # cs_copy_plugins(CsGui)
+ # cs_copy_plugins(CsPrinterDriver)
endif()
|