-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (20 loc) · 804 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (20 loc) · 804 Bytes
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
cmake_minimum_required(VERSION 3.10)
project(WitchHutFinder LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# We need to build Cubiomes as a dependency
add_custom_target(
cubiomes
COMMAND make
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cubiomes"
)
# add the executable
add_executable(WitchHutFinder finder.cpp)
if (OPTIMIZE_SEED)
target_compile_definitions(WitchHutFinder PRIVATE -DOPTIMIZE_SEED=${OPTIMIZE_SEED})
endif()
target_include_directories(WitchHutFinder PRIVATE "${CMAKE_SOURCE_DIR}/cubiomes")
target_link_libraries(WitchHutFinder PUBLIC -lm -fwrapv -lpthread)
target_link_libraries(WitchHutFinder PUBLIC ${CMAKE_SOURCE_DIR}/cubiomes/libcubiomes.a)
# Add the cubiomes dependency to ensure it is built.
add_dependencies(WitchHutFinder cubiomes)