-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 867 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
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-missing-braces")
project(AnyNEAT)
file(GLOB_RECURSE SOURCES
src/*.h
src/*.cpp
imgui/*.h
imgui/*.cpp
src/network/*.cpp
src/network/*.h
)
if(${EMSCRIPTEN})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -s USE_SDL=2 -std=c++1z -pthread -s SAFE_HEAP=1 -s ASSERTIONS=2 -s DEMANGLE_SUPPORT=1 -g -s PTHREAD_POOL_SIZE=2 -s ALLOW_MEMORY_GROWTH")
else()
find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)
endif()
include_directories(${SDL2_INCLUDE_DIRS} imgui ${OPENGL_INCLUDE_DIRS} glm ./src/network src)
source_group(src REGULAR_EXPRESSION src)
source_group(imgui REGULAR_EXPRESSION imgui)
add_executable(AnyNEAT ${SOURCES})
target_link_libraries(AnyNEAT ${SDL2_LIBRARIES} ${OPENGL_LIBRARIES})