blob: 172e213d92cd138075bd42f84d5a62965099672d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
# project name
project(cowgui CXX)
set(CMAKE_CXX_STANDARD 11)
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")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
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)
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_SRCS}
# ${COWGUI_MOC_SOURCES}
# ${COWGUI_UI_HEADERS}
# ${COWGUI_RC_SOURCES}
# ${COWGUI_QMS}
)
target_link_libraries(cowgui
Qt5::Widgets
Qt5::Network
)
install(TARGETS cowgui RUNTIME DESTINATION bin)
|