summarylogtreecommitdiffstats
path: root/0001-Set-correct-library-names.patch
blob: 261fa0b82c9892d4f3eacd966b5aa3616f0e109a (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
From 8735d30e13067146ba6e1968b491b4654fdb19f7 Mon Sep 17 00:00:00 2001
From: KokaKiwi <kokakiwi+git@kokakiwi.net>
Date: Sun, 19 Sep 2021 15:10:13 +0200
Subject: [PATCH] Set correct library names

---
 CMakeLists.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4aab3a3..5178b35 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)
@@ -103,9 +104,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