-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
32 lines (23 loc) · 974 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
cmake_minimum_required(VERSION 3.10)
project(game-math)
# use C++11 standard
set (CMAKE_CXX_STANDARD 11)
# suppress generating ZERO_CHECK project
set (CMAKE_SUPPRESS_REGENERATION true)
# add source files
file(GLOB_RECURSE SOURCE_FILES
${CMAKE_SOURCE_DIR}/src/*.c
${CMAKE_SOURCE_DIR}/src/*.cpp)
# add header files
file(GLOB_RECURSE HEADER_FILES
${CMAKE_SOURCE_DIR}/lib/vectormath/*.hpp
${CMAKE_SOURCE_DIR}/src/*.h
${CMAKE_SOURCE_DIR}/src/*.hpp)
include_directories(${CMAKE_SOURCE_DIR}/lib/glfw/include)
include_directories(${CMAKE_SOURCE_DIR}/lib/glad/include)
include_directories(${CMAKE_SOURCE_DIR}/lib/vectormath)
add_executable(${PROJECT_NAME} WIN32 ${HEADER_FILES} ${SOURCE_FILES})
add_library(glad "lib/glad/src/glad.c")
link_directories(${CMAKE_SOURCE_DIR}/lib)
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/glfw/lib/glfw3.lib glad)