1
0
mirror of synced 2025-01-29 19:17:28 +01:00

build: Fixed system llvm linking errors

This commit is contained in:
WerWolv 2022-08-09 14:59:58 +02:00
parent 0192c791ce
commit a3132b7d13
3 changed files with 6 additions and 6 deletions

View File

@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.16)
project(llvm-demangle)
project(LLVMDemangle)
set(CMAKE_CXX_STANDARD 17)
add_library(llvm-demangle STATIC
add_library(LLVMDemangle STATIC
source/Demangle.cpp
source/DLangDemangle.cpp
source/ItaniumDemangle.cpp
@ -12,4 +12,4 @@ add_library(llvm-demangle STATIC
source/RustDemangle.cpp
)
target_include_directories(llvm-demangle PUBLIC include)
target_include_directories(LLVMDemangle PUBLIC include)

View File

@ -54,7 +54,7 @@ endif()
if (NOT USE_SYSTEM_LLVM)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../external/llvm-demangle ${CMAKE_CURRENT_BINARY_DIR}/external/llvm-demangle EXCLUDE_FROM_ALL)
set_target_properties(llvm-demangle PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(LLVMDemangle PROPERTIES POSITION_INDEPENDENT_CODE ON)
else()
find_package(LLVM REQUIRED Demangle)
endif()
@ -163,4 +163,4 @@ if (APPLE)
target_link_libraries(libimhex PUBLIC ${FOUNDATION})
endif ()
target_link_libraries(libimhex PUBLIC dl imgui nfd magic ${CAPSTONE_LIBRARIES} llvm-demangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${FMT_LIBRARIES} ${Python_LIBRARIES} libromfs libpl)
target_link_libraries(libimhex PUBLIC dl imgui nfd magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${FMT_LIBRARIES} ${Python_LIBRARIES} libromfs libpl)

View File

@ -67,7 +67,7 @@ add_library(${PROJECT_NAME} SHARED
target_include_directories(${PROJECT_NAME} PRIVATE include)
# Add additional libraries here #
target_link_libraries(${PROJECT_NAME} PRIVATE libimhex llvm-demangle)
target_link_libraries(${PROJECT_NAME} PRIVATE libimhex LLVMDemangle)
# ---- No need to change anything from here downwards unless you know what you're doing ---- #