forked from radj307/ARRCON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (23 loc) · 1.23 KB
/
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
33
34
# ARRCON
cmake_minimum_required (VERSION 3.19)
# Add 307modules to cmake modules path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/307lib/307modules")
include(AutoVersion)
set(ENV{ARRCON_VERSION} "0.0.0")
GET_VERSION("ARRCON" "${CMAKE_CURRENT_SOURCE_DIR}")
CREATE_VERSION_HEADER(ARRCON ${ARRCON_VERSION_MAJOR} ${ARRCON_VERSION_MINOR} ${ARRCON_VERSION_PATCH})
project("ARRCON" VERSION ${ARRCON_VERSION} LANGUAGES CXX)
option(307lib_USE_INSTALLATION "When true, uses an installed version of the 307lib library instead of a git submodule." OFF)
if (307lib_USE_INSTALLATION)
set(307lib_PATH "${CMAKE_SOURCE_DIR}/307lib" CACHE STRING "The path to the root 307lib installation directory. (Contains <Debug|Release|MinSizeRel|RelWithDebInfo> depending on your desired build type)")
elseif(EXISTS "${CMAKE_SOURCE_DIR}/307lib/CMakeLists.txt")
add_subdirectory("307lib")
else()
message(FATAL_ERROR "Cannot find a valid installation of 307lib!")
endif()
add_subdirectory ("ARRCON") # ARRCON Project Executable
if (WIN32)
add_subdirectory(libunistd) # replace the unistd library with "libunistd" on windows
target_include_directories(libunistd PUBLIC "libunistd" "libunistd/unistd")
target_link_libraries(ARRCON PUBLIC libunistd)
endif()