blob: e6aa0bead52ba4b212a6bbe88f0e42d01dd2361d (
plain)
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
77
78
79
80
81
|
From 19da13e41a4cc5cdd0d28ed22f8ca0083b01ffd0 Mon Sep 17 00:00:00 2001
From: KokaKiwi <kokakiwi+git@kokakiwi.net>
Date: Thu, 3 Mar 2022 19:58:41 +0100
Subject: [PATCH 1/3] makepkg: Remove external stuff
---
CMakeLists.txt | 1 -
cmake/build_helpers.cmake | 39 +--------------------------------------
2 files changed, 1 insertion(+), 39 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cba0c6b..b4088cae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,6 @@ option(IMHEX_PATTERNS_PULL_MASTER "Download latest files from master branch of t
# Make sure project is configured correctly
setDefaultBuiltTypeIfUnset()
-detectBadClone()
# List plugin names here. Project name must match folder name
set(PLUGINS
diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
index 8a40a609..5aff088f 100644
--- a/cmake/build_helpers.cmake
+++ b/cmake/build_helpers.cmake
@@ -226,9 +226,8 @@ macro(createPackage)
install(FILES ${CMAKE_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
install(FILES ${CMAKE_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png)
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
- downloadImHexPatternsFiles("./share/imhex")
endif()
-
+
if (CREATE_BUNDLE)
include(PostprocessBundle)
@@ -276,39 +275,3 @@ macro(setDefaultBuiltTypeIfUnset)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
endmacro()
-
-macro(detectBadClone)
- file (GLOB EXTERNAL_DIRS "lib/external/*")
- foreach (EXTERNAL_DIR ${EXTERNAL_DIRS})
- file(GLOB RESULT "${EXTERNAL_DIR}/*")
- list(LENGTH RESULT ENTRY_COUNT)
- if(ENTRY_COUNT LESS_EQUAL 1)
- message(FATAL_ERROR "External dependency ${EXTERNAL_DIR} is empty!\nMake sure to correctly clone ImHex using the --recurse-submodules git option or initialize the submodules manually.")
- endif()
- endforeach ()
-endmacro()
-
-
-function(downloadImHexPatternsFiles dest)
- if (NOT IMHEX_OFFLINE_BUILD)
- if (IMHEX_PATTERNS_PULL_MASTER)
- set(PATTERNS_BRANCH master)
- else ()
- set(PATTERNS_BRANCH ImHex-v${IMHEX_VERSION})
- endif ()
-
- FetchContent_Declare(
- imhex_patterns
- GIT_REPOSITORY https://github.com/WerWolv/ImHex-Patterns.git
- GIT_TAG master
- )
-
- FetchContent_Populate(imhex_patterns)
-
- set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic)
- foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
- install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest})
- endforeach ()
- endif ()
-
-endfunction()
\ No newline at end of file
--
2.37.1
|