forked from blue/squawk
a bit of polish
This commit is contained in:
parent
4d3ba6b11f
commit
296328f12d
4 changed files with 22 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.4)
|
||||
project(squawk VERSION 0.1.6 LANGUAGES CXX)
|
||||
project(squawk VERSION 0.2.0 LANGUAGES CXX)
|
||||
|
||||
cmake_policy(SET CMP0076 NEW)
|
||||
cmake_policy(SET CMP0079 NEW)
|
||||
|
@ -32,6 +32,7 @@ option(WITH_KIO "Build KIO support module" ON)
|
|||
|
||||
# Dependencies
|
||||
## Qt
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
find_package(Qt5 COMPONENTS Widgets DBus Gui Xml Network Core REQUIRED)
|
||||
find_package(Boost COMPONENTS)
|
||||
|
||||
|
@ -114,12 +115,18 @@ endif ()
|
|||
message("Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
target_compile_options(squawk PRIVATE
|
||||
"-Wall;-Wextra"
|
||||
"$<$<CONFIG:DEBUG>:-g>"
|
||||
"$<$<CONFIG:RELEASE>:-O3>"
|
||||
"-fno-sized-deallocation" # for eliminating _ZdlPvm
|
||||
)
|
||||
set (COMPILE_OPTIONS -fno-sized-deallocation) # for eliminating _ZdlPvm
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
list(APPEND COMPILE_OPTIONS -O3)
|
||||
endif()
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
list(APPEND COMPILE_OPTIONS -g)
|
||||
list(APPEND COMPILE_OPTIONS -Wall)
|
||||
list(APPEND COMPILE_OPTIONS -Wextra)
|
||||
endif()
|
||||
|
||||
message("Compilation options: " ${COMPILE_OPTIONS})
|
||||
target_compile_options(squawk PRIVATE ${COMPILE_OPTIONS})
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
add_subdirectory(core)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue