-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
35 lines (24 loc) · 1 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
cmake_minimum_required(VERSION 3.6)
cmake_policy(SET CMP0015 NEW)
project(Unamed)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -O3")
endif()
file(GLOB_RECURSE PG_UN "${Unamed_SOURCE_DIR}/src/*.hpp")
file(GLOB_RECURSE HD_UN "${Unamed_SOURCE_DIR}/src/*.cpp" "${Unamed_SOURCE_DIR}/main.cpp")
set_property(GLOBAL APPEND_STRING PROPERTY COMPILE_FLAGS -Wall)
# include_directories(src/)
set(CMAKE_MODULE_PATH "${Unamed_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
find_package(SFML 2 REQUIRED graphics window system network audio)
find_package(PythonLibs 3.6 REQUIRED)
include_directories(${SFML_INCLUDE_DIR})
include_directories(${PYTHON_INCLUDE_DIR})
add_executable(Unamed ${PG_UN} ${HD_UN})
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(Unamed ${EXECUTABLE_NAME} ${SFML_LIBRARIES})
endif()
if (PYTHONLIBS_FOUND)
include_directories(${PYTHONLIBS_INCLUDE_DIR})
target_link_libraries(Unamed ${EXECUTABLE_NAME} ${PYTHON_LIBRARIES})
endif()