-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
36 lines (26 loc) · 1.01 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
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2023 Casper Andersson <[email protected]>
cmake_minimum_required(VERSION 3.12)
# ============= Linktest shared ===============
project(wiretime VERSION 1.0)
add_library(link STATIC include/liblink.h src/liblink.c)
target_include_directories(link PUBLIC ${PROJECT_SOURCE_DIR}/include/)
macro(m_install)
install(TARGETS ${arg1}
CONFIGURATIONS Debug
RUNTIME DESTINATION bin)
install(TARGETS ${arg1}
CONFIGURATIONS Release
RUNTIME DESTINATION bin)
endmacro()
set(PROJECT_INCLUDES ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include)
# ============= Wiretime ===============
project(wiretime VERSION 1.0)
# ---- BUILD ----
add_executable(wiretime)
target_sources(wiretime PRIVATE src/timestamping.c src/wiretime.c)
target_include_directories(wiretime PUBLIC ${PROJECT_INCLUDES})
target_link_libraries(wiretime PUBLIC pthread link)
m_install(wiretime)
# ============= Configure ===============
configure_file(include/version.h.in include/version.h)