2017-11-22 05:24:51 +00:00
|
|
|
cmake_minimum_required(VERSION 3.9)
|
|
|
|
|
|
|
|
# it me
|
2017-12-06 22:07:36 +00:00
|
|
|
project(erc)
|
2017-11-22 05:24:51 +00:00
|
|
|
|
|
|
|
include(sources.cmake)
|
|
|
|
|
2017-12-17 05:38:59 +00:00
|
|
|
if(APPLE)
|
|
|
|
set(opengl_library /System/Library/Frameworks/OpenGL.framework)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT opengl_library)
|
|
|
|
message(FATAL_ERROR "This CMake file is not yet educated as to where OpenGL resides on your platform. Sorry!")
|
|
|
|
endif()
|
|
|
|
|
2017-12-06 22:07:36 +00:00
|
|
|
foreach(src ${erc_sources})
|
2017-11-22 05:24:51 +00:00
|
|
|
string(CONCAT relsrc src/ ${src})
|
|
|
|
list(APPEND sources ${relsrc})
|
|
|
|
endforeach(src)
|
|
|
|
|
|
|
|
# our header files
|
|
|
|
include_directories(include /usr/local/include)
|
|
|
|
|
|
|
|
link_directories(/usr/local/lib)
|
|
|
|
|
|
|
|
# our bullshit
|
2017-12-06 22:07:36 +00:00
|
|
|
add_executable(erc ${sources} src/main.c)
|
2017-12-17 04:45:39 +00:00
|
|
|
|
|
|
|
# Graphics
|
2017-12-18 01:09:54 +00:00
|
|
|
target_link_libraries(erc ${opengl_library} glfw GLEW)
|