summarylogtreecommitdiffstats
path: root/0002-Set-correct-library-names.patch
diff options
context:
space:
mode:
authorKokaKiwi2021-09-19 15:30:24 +0200
committerKokaKiwi2021-09-19 15:30:24 +0200
commit56b3f1ffa48d046e6d7ea2416de0f468ac886481 (patch)
treec56e349c51890a1a98a12f30143abac2c50b76ef /0002-Set-correct-library-names.patch
parent9e8e1d8447d78d13c72726bb4f1e83765a5e26d8 (diff)
downloadaur-56b3f1ffa48d046e6d7ea2416de0f468ac886481.tar.gz
Fix build errors and use system libs when possible
- Fix build with -Werror=format-security - Use system libraries for LLVMDemangle and libyara
Diffstat (limited to '0002-Set-correct-library-names.patch')
-rw-r--r--0002-Set-correct-library-names.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/0002-Set-correct-library-names.patch b/0002-Set-correct-library-names.patch
new file mode 100644
index 000000000000..14822545c94c
--- /dev/null
+++ b/0002-Set-correct-library-names.patch
@@ -0,0 +1,38 @@
+From 957162f83b6cfa0c89d325c6bc6134127cc99a09 Mon Sep 17 00:00:00 2001
+From: KokaKiwi <kokakiwi+git@kokakiwi.net>
+Date: Sun, 19 Sep 2021 15:10:13 +0200
+Subject: [PATCH 2/2] Set correct library names
+
+---
+ CMakeLists.txt | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3fa17c4..de99ca2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,6 +34,7 @@ else()
+ endif()
+ if (NOT USE_SYSTEM_YARA)
+ add_subdirectory(external/yara)
++ set(YARA_LIBRARIES libyara)
+ else()
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(YARA REQUIRED IMPORTED_TARGET yara)
+@@ -99,9 +100,11 @@ set_target_properties(imhex PROPERTIES CXX_VISIBILITY_PRESET hidden)
+ target_link_directories(imhex PRIVATE ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
+
+ if (WIN32)
+- target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} wsock32 ws2_32 libyara Dwmapi.lib dl)
++ target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} wsock32 ws2_32
++ ${YARA_LIBRARIES} Dwmapi.lib dl)
+ else ()
+- target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl pthread libyara)
++ target_link_libraries(imhex ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl pthread
++ ${YARA_LIBRARIES})
+ endif ()
+
+ createPackage()
+--
+2.33.0
+