build: Use system libraries if so desired. (#210)
Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
parent
fe977f4ba9
commit
db5402dc09
@ -25,13 +25,28 @@ findLibraries()
|
||||
detectOS()
|
||||
detectArch()
|
||||
|
||||
if (NOT USE_SYSTEM_LLVM)
|
||||
add_subdirectory(external/llvm)
|
||||
else()
|
||||
find_package(LLVM REQUIRED Demangle)
|
||||
endif()
|
||||
if (NOT USE_SYSTEM_YARA)
|
||||
add_subdirectory(external/yara)
|
||||
else()
|
||||
find_package(yara REQUIRED)
|
||||
endif()
|
||||
|
||||
# Add bundled dependencies
|
||||
add_subdirectory(external/llvm)
|
||||
add_subdirectory(external/yara)
|
||||
add_subdirectory(plugins/libimhex)
|
||||
|
||||
# Add include directories
|
||||
include_directories(include ${MBEDTLS_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
|
||||
if (USE_SYSTEM_LLVM)
|
||||
include_directories(include ${LLVM_INCLUDE_DIRS})
|
||||
endif()
|
||||
if (USE_SYSTEM_YARA)
|
||||
include_directories(include ${YARA_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
addVersionDefines()
|
||||
configurePackageCreation()
|
||||
|
@ -5,9 +5,16 @@ set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/ImGui ${CMAKE_CURRENT_BINARY_DIR}/external/ImGui)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json)
|
||||
|
||||
if(USE_SYSTEM_NLOHMANN_JSON)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
else()
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json)
|
||||
endif()
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nativefiledialog ${CMAKE_CURRENT_BINARY_DIR}/external/nativefiledialog EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/fmt ${CMAKE_CURRENT_BINARY_DIR}/external/fmt)
|
||||
|
||||
set(XDGPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../external/xdgpp")
|
||||
set(CMAKE_USE_MBEDTLS ON)
|
||||
set(BUILD_CURL_EXE OFF)
|
||||
|
Loading…
Reference in New Issue
Block a user