message(FATAL_ERROR "Directory libs_required/OpenMesh has been moved to OpenFlipper/libs_required/OpenMesh! Please remove the old directory if it's still there!")
endif()
# Set and enforce C++-11 flags
set( CMAKE_CXX_STANDARD_REQUIRED TRUE )
set( CMAKE_CXX_STANDARD 11 )
# ACG Environment default settings
# This is ugly but currently we need to work around the default installed 5.3 on debian
# Default to this install path for QT%_INSTALL_DIR
set(QT5_INSTALL_PATH /ACG/acgdev/gcc-4.9-x86_64/qt-5.6.0/5.6/gcc_64/ CACHE PATH "Qt5 install path set for ACG environment")
endif()
if( WIN32 )
# This is the base directory for windows library search used in the finders we shipp.
set(CMAKE_WINDOWS_LIBS_DIR "c:/libs" CACHE STRING "Default Library search dir on windows.")
endif()
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif()
IF( APPLE )
IF(CMAKE_BUILD_TYPE MATCHES Debug)
message(WARNING "WARNING: Mac Debug mode might mix debug and release libraries (Webkit, ...), which causes strange errors. If you use ports to provide qt, you might want to disable Qt debug libraries to make sure only release qt libraries are linked to OpenFlippers debug build.")
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
endif()
project(OpenFlipper)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.9" OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.9")
message(WARNING "Your version of GCC contains an optimizer bug. Please verify that you do not use -O3!")
set( BRANDING_DIRECTORY "${CMAKE_SOURCE_DIR}/${BRANDING_DIRECTORY_TMP}" CACHE PATH "Path to the branding files")
if(${branding_dir_count} GREATER 1 )
message(WARNING "Found multiple branding dirs in : ${_local_branding_in}")
message(WARNING "Using only first branding directory: ${BRANDING_DIRECTORY}")
endif()
elseif()
set( BRANDING_DIRECTORY "branding" CACHE PATH "Path to the branding files")
endif()
if( EXISTS ${BRANDING_DIRECTORY}/branding.cmake )
include(${BRANDING_DIRECTORY}/branding.cmake)
endif()
if( EXISTS ${BRANDING_DIRECTORY}/branding.h )
set( BRANDING_HEADER true CACHE String "Indicate there is a branding.h inside the branding folder that should be included.")
endif()
#Initialize with defaults, if not already set via branding cmake file
set( OPENFLIPPER_PRODUCT_STRING "OpenFlipper" CACHE String "Product string used e.g. to determine the config file path. Should only contain alphanumeric characters (no spaces).")
set( OPENFLIPPER_PRODUCT_NAME "OpenFlipper" CACHE String "Product name used in all visible places (e.g. about box).")
set(PREFOUND_PACKAGES "${LOADED_PACKAGES}" CACHE INTERNAL "List of packages that will get found at global scope so they don't get found over and over inside the individual packages.")
if( APPLE AND NOT DEFINED OPENFLIPPER_CALL_FIX_BUNDLE )
set( OPENFLIPPER_CALL_FIX_BUNDLE false CACHE BOOL "After building OpenFlipper, a bundle creation step is executed (which copies all dependencies into the bundle) to create a valid MacOs Bundle. This step is only necessary if creating a package.")
endif()
# prepare bundle generation cmake file and add a build target for it