33 lines
781 B
CMake
33 lines
781 B
CMake
project(PixelWars)
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
set(VERSION_MAJOR 1)
|
|
set(VERSION_MINOR 0)
|
|
|
|
# choose source file
|
|
file(GLOB EXEC_SRC_LIST src/*.cpp)
|
|
file(GLOB RESOURCES_FILES src/*.h resources.qrc src/*.ui shaders/*.glsl)
|
|
if(MINGW)
|
|
file(GLOB RESOURCE_ICON_FILE icon.rc)
|
|
list(APPEND RESOURCES_FILES ${RESOURCE_ICON_FILE})
|
|
set(CMAKE_RC_COMPILER_INIT windres)
|
|
ENABLE_LANGUAGE(RC)
|
|
SET(CMAKE_RC_COMPILE_OBJECT
|
|
"<CMAKE_RC_COMPILER> -i <SOURCE> -o <OBJECT>")
|
|
endif(MINGW)
|
|
|
|
set(EXTRA_INCLUDES src)
|
|
|
|
#set compilation option
|
|
set(USE_RENDERER True)
|
|
set(USE_QT5 True)
|
|
set(QT_MODULE core gui widgets opengl)
|
|
|
|
set(CMAKE_TEMPLATE_PATH "../CMakeTemplate")
|
|
|
|
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
add_definitions(-DDEBUG_MODE)
|
|
endif()
|
|
|
|
include(${CMAKE_TEMPLATE_PATH}/template.cmake)
|