1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-08-20 09:29:01 +00:00
erc-c/tests/CMakeLists.txt
Peter Evans 8beb761535 Actually show a window.
This is also the beginning outline of how we want to abstract graphics
away in erc.
2017-12-16 23:38:59 -06:00

37 lines
902 B
CMake

cmake_minimum_required(VERSION 3.9)
project(erc-test)
set(CMAKE_BUILD_TYPE Debug)
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()
include_directories(../include /usr/local/include)
link_directories(/usr/local/lib)
include(../sources.cmake)
foreach(src ${erc_sources})
string(CONCAT relsrc ../src/ ${src})
list(APPEND sources ${relsrc})
endforeach(src)
# test_sources should also include the main source file, so we don't need to
# make any particular effort to include it in add_executable().
file(GLOB test_sources "*.c")
add_executable(erc-test ${sources} ${test_sources})
# Our unit-testing library
target_link_libraries(erc-test criterion)
# Graphics
target_link_libraries(erc-test ${opengl_library} glfw)