diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a72808..172e213 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,15 @@ -cmake_minimum_required(VERSION 3.15 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) # project name project(cowgui CXX) set(CMAKE_CXX_STANDARD 11) -set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_CONFIGURATION_TYPES Debug Release) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) + message(STATUS "Build type is not set. Defaulting to ${CMAKE_BUILD_TYPE} build!") +endif(NOT CMAKE_BUILD_TYPE) + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wextra -Werror -Wno-multichar -std=c++11") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wno-multichar -std=c++11") @@ -13,7 +18,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -file(GLOB COWGUI_SOURCES src/*.cpp) +file(GLOB COWGUI_SRCS src/*.cpp) #file(GLOB_RECURSE COWGUI_MOC_HEADERS src/*.h) #file(GLOB_RECURSE COWGUI_UIS src/ui/*.ui) #file(GLOB_RECURSE COWGUI_RESOURCES src/*.qrc) @@ -23,8 +28,12 @@ FIND_PACKAGE(Qt5 COMPONENTS Widgets Network REQUIRED) #QT5_WRAP_UI(COWGUI_UI_HEADERS ${COWGUI_UIS}) #QT5_WRAP_CPP(COWGUI_MOC_SOURCES ${COWGUI_MOC_HEADERS}) +include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + add_executable(cowgui - ${COWGUI_SOURCES} + ${COWGUI_SRCS} # ${COWGUI_MOC_SOURCES} # ${COWGUI_UI_HEADERS} # ${COWGUI_RC_SOURCES} |