30 lines
681 B
CMake
30 lines
681 B
CMake
project(SparrowRenderer)
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
set(VERSION_MAJOR 1)
|
|
set(VERSION_MINOR 0)
|
|
|
|
# choose resource files
|
|
file(GLOB RESOURCES_FILES src/*.h shaders/*.glsl)
|
|
FILE(GLOB RES_SRC_FILE shaders/*.glsl)
|
|
SET(RESOURCE_DST_FILE shaders.cpp)
|
|
|
|
# choose source file
|
|
file(GLOB LIB_SRC_LIST src/*.cpp)
|
|
list(APPEND LIB_SRC_LIST ${RESOURCE_DST_FILE})
|
|
file(GLOB LIB_HEAD_LIST src/*.h)
|
|
|
|
#set compilation option
|
|
set(IS_LIBRARY True)
|
|
set(USE_IMGUI True)
|
|
set(USE_OPENGL True)
|
|
|
|
add_definitions(-Wno-comment)
|
|
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
add_definitions(-DRENDER_DEBUG)
|
|
endif()
|
|
|
|
set(CMAKE_TEMPLATE_PATH "../CMakeTemplate")
|
|
|
|
include(${CMAKE_TEMPLATE_PATH}/template.cmake)
|