forked from radareorg/r2retdec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (26 loc) · 821 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.8)
include(FetchContent)
FetchContent_Declare(cutter
GIT_REPOSITORY https://github.com/radareorg/cutter
GIT_TAG master
)
FetchContent_GetProperties(cutter)
if(NOT Cutter_POPULATED)
FetchContent_Populate(cutter)
find_path(Cutter_SOURCE_ROOT
NAMES core/Cutter.h
PATHS "${cutter_SOURCE_DIR}"
PATH_SUFFIXES src
NO_DEFAULT_PATH
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Cutter
REQUIRED_VARS Cutter_SOURCE_ROOT
FAIL_MESSAGE "Fetching Cutter sources failed"
)
if(Cutter_FOUND)
set(CUTTER_INCLUDE_DIRS "${Cutter_SOURCE_ROOT}" "${Cutter_SOURCE_ROOT}/common" "${Cutter_SOURCE_ROOT}/core")
add_library(Cutter::Cutter INTERFACE IMPORTED GLOBAL)
target_include_directories(Cutter::Cutter INTERFACE ${CUTTER_INCLUDE_DIRS})
endif()