-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
24 lines (21 loc) · 902 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
cmake_minimum_required(VERSION 3.22)
project(DwarfAnalysisTool)
set(CMAKE_CXX_STANDARD 17)
if (UNIX AND NOT APPLE)
add_subdirectory(lib)
add_executable(test test.cpp)
target_compile_options(test PUBLIC -g -Wall)
target_include_directories(test PUBLIC include)
target_link_libraries(test DwarfAnalysisTool dwarf z)
set_target_properties(test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
elseif(APPLE)
add_subdirectory(lib)
add_executable(test test.cpp)
target_compile_options(test PUBLIC -g -Wall)
target_include_directories(test PUBLIC include /usr/local/include)
target_link_directories(test PUBLIC /usr/local/lib64)
target_link_libraries(test DwarfAnalysisTool dwarf z)
set_target_properties(test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
else()
message(FATAL_ERROR "This project is linux project")
endif()