Index: trunk/kdesupport/qimageblitz/CMakeLists.txt =================================================================== --- trunk/kdesupport/qimageblitz/CMakeLists.txt (revision 1548171) +++ trunk/kdesupport/qimageblitz/CMakeLists.txt (revision 1548172) @@ -1,57 +1,57 @@ project(blitz) cmake_minimum_required(VERSION 2.6.4) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ) option(QT4_BUILD "Force building with Qt4 even if Qt5 is found") if (NOT QT4_BUILD) find_package(Qt5Core QUIET) endif() if (Qt5Core_FOUND) message(STATUS "Building with Qt5 support") cmake_minimum_required(VERSION 2.8.8) # Bump requirement for automoc and convenience macros. set(CMAKE_AUTOMOC ON) find_package(Qt5Core REQUIRED) find_package(Qt5Gui REQUIRED) find_package(Qt5Widgets REQUIRED) else() find_package(Qt4 REQUIRED) # properly set up compile flags (QT_DEBUG/QT_NO_DEBUG, ...) include(${QT_USE_FILE}) endif() set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries") # ## the following are directories where stuff will be installed to set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde binary install dir (default prefix/bin)") set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})") if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) - 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") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common") add_definitions(-DQT_NO_EXCEPTIONS) endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) endif (CMAKE_COMPILER_IS_GNUCXX) if (WIN32) set(CMAKE_DEBUG_POSTFIX "d") set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) endif (WIN32) # Set up RPATH handling, so the libs are found if they are installed to a non-standard location. # By default cmake builds the targets with full RPATH to everything in the build directory, # but then removes the RPATH when installing. # These two options below make it set the RPATH of the installed targets to all # RPATH directories outside the current CMAKE_BINARY_DIR and also the library # install directory. Alex set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}" ) if(APPLE) set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) endif(APPLE) add_subdirectory(blitz) add_subdirectory(test)