-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
23 lines (15 loc) · 747 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
cmake_minimum_required(VERSION 3.29.1)
find_package(libwebsockets CONFIG REQUIRED)
project(PhysicsEngine)
# Neovim LSP helping
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})
add_subdirectory(engine)
add_executable(PhysicsEngine main.c main.h draw_circle.h draw_circle.c)
add_executable(PhysicsEngineServer server.c)
# C99 version
set_property(TARGET PhysicsEngine PROPERTY C_STANDARD 99)
target_link_libraries(PhysicsEngine ${SDL2_LIBRARIES} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS} engine)
target_link_libraries(PhysicsEngineServer websockets_shared ${LIBWEBSOCKETS_DEP_LIBS})
target_include_directories(engine PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/engine")