Gered
648832d939
full disclosure: i'm a bit unsure of what is the best way to do this at this point in time. the end goal with this project is that it becomes a library to be used by other apps (of course), but need tests to test various library functionality. unsure how best to organize this with cmake (and since i'm using clion, i kind of would prefer it works nicely and integrated with the ide...). i figure this is going to be a trial and error approach that will evolve over the next while
21 lines
576 B
CMake
21 lines
576 B
CMake
cmake_minimum_required(VERSION 2.8.4)
|
|
|
|
project(SoftwareRasterizer)
|
|
|
|
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
set(TESTS_DIR "${ROOT_DIR}/test")
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${ROOT_DIR}/cmake")
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
file(GLOB_RECURSE LIB_SRC_FILES "."
|
|
"${ROOT_DIR}/src/*.cpp"
|
|
"${ROOT_DIR}/src/*.c"
|
|
"${ROOT_DIR}/src/*.h"
|
|
"${ROOT_DIR}/include/*.h"
|
|
)
|
|
include_directories(${SDL2_INCLUDE_DIR} "${ROOT_DIR}/include")
|
|
|
|
add_executable("test_wm" "${TESTS_DIR}/test_wm.c" ${LIB_SRC_FILES})
|
|
target_link_libraries("test_wm" ${SDL2_LIBRARY})
|