-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (43 loc) · 1.29 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#set cmake version
cmake_minimum_required(VERSION 3.27.1)
project(engine_computer)
# set c standards
set(CMAKE_CXX_STANDARD 20)
message("C++ VERSION -> 20")
# lsp support
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# boost
find_package(Boost REQUIRED)
Message("BOOST FOUND")
# include directories
include_directories(lib)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${Boost_INCLUDE_DIR})
# Fetch system includes
include_directories("/usr/local/include/")
if (APPLE)
message("SETTING Apple Library Paths")
set(LJM "/usr/local/lib/libLabJackM.dylib")
elseif (UNIX)
message("SETTING Unix/Linux Library Paths!")
set(LJM "/usr/local/lib/libLabJackM.so")
endif ()
# Fetch External Library Declarations
include(FetchContent)
FetchContent_Declare(
json
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
)
message("CLONED json")
FetchContent_Declare(
msgpack
GIT_REPOSITORY https://github.com/mikeloomisgg/cppack
)
message("LINKING TO EXECUTABLE")
add_executable(engine_computer main.cpp helpers.cpp)
# json
FetchContent_MakeAvailable(json)
add_library(json INTERFACE)
target_include_directories(json INTERFACE ${json_SOURCE_DIR}/include)
# link all libs
target_link_libraries(engine_computer PRIVATE ${LJM} ${BOOST_Libraries} json)