-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
29 lines (22 loc) · 782 Bytes
/
CMakeLists.txt
File metadata and controls
29 lines (22 loc) · 782 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
28
cmake_minimum_required(VERSION 3.15)
project(simpler_machine LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_compile_options(-Wall -Wextra -Wpedantic)
# Place built shared libraries in the build directory.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
find_package(Threads REQUIRED)
set(EXTRA_LIBS Threads::Threads)
if(UNIX AND NOT APPLE)
list(APPEND EXTRA_LIBS dl)
endif()
add_library(machine SHARED
src/machine/machine.cpp
)
target_include_directories(machine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(machine PUBLIC ${EXTRA_LIBS})
add_library(addworker SHARED
src/worker/add/add.cpp
)
target_include_directories(addworker PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)