-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (23 loc) · 889 Bytes
/
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
cmake_minimum_required(VERSION 3.18.4)
set(REPO shsh)
project(${REPO})
set(PROJECT_NAME ${REPO})
set(CMAKE_C_STANDARD 99)
set(CPP_FLAGS "-Wall -Wextra -pedantic -ggdb")
include_directories(${PROJECT_SOURCE_DIR}/include)
file(GLOB SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/driver.c ${SOURCES})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin)
set_target_properties(${PROJECT_NAME}
PROPERTIES
COMPILE_FLAGS ${CPP_FLAGS}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin
)
set_property(
TARGET ${PROJECT_NAME}
PROPERTY
CMAKE_OBJECT_PATH_PREFIX ${PROJECT_SOURCE_DIR}/build/obj/
)
set(CMAKE_BINARY_DIR ${PROJECT_SOURCE_DIR}/build/cmake)
include_directories(${PROJECT_SOURCE_DIR}/build/cmake)
target_link_libraries(shsh pthread) # Debian (skill) issue