2013-07-24 12:47:56 +00:00
|
|
|
find_package(Qt5Transitional)
|
|
|
|
include_directories( ${QT_INCLUDES} )
|
2011-07-23 11:14:37 +00:00
|
|
|
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
|
|
|
|
# Select flags.
|
|
|
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -DQT_NO_DEBUG")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline")
|
|
|
|
set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
|
|
|
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
|
|
|
|
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG -DQT_NO_DEBUG")
|
|
|
|
set(CMAKE_C_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
|
|
|
|
set(CMAKE_C_FLAGS_DEBUGFULL "-g3 -fno-inline")
|
|
|
|
set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
|
|
|
|
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
|
|
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
|
2013-07-24 23:50:39 +00:00
|
|
|
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -fPIC")
|
2011-07-23 11:14:37 +00:00
|
|
|
add_definitions (-D_BSD_SOURCE)
|
|
|
|
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
|
|
|
|
|
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
2014-01-14 10:01:22 +00:00
|
|
|
|
|
|
|
if(MINGW)
|
|
|
|
set(CMAKE_RC_COMPILER_INIT windres)
|
|
|
|
enable_language(RC)
|
|
|
|
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -i <SOURCE> -o <OBJECT>")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
add_definitions(-DQT_NO_DEBUG -DQT_FORCE_ASSERTS)
|
|
|
|
endif()
|