# Customise your preferences in "./conf.d/cmake/config.cmake"
#--------------------------------------------------------------------------
-# Check GCC minimal version
-if (gcc_minimal_version)
- message (STATUS "${Cyan}-- Check gcc_minimal_version (found gcc version ${CMAKE_C_COMPILER_VERSION}) \
- (found g++ version ${CMAKE_CXX_COMPILER_VERSION})${ColourReset}")
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version} OR CMAKE_C_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version})
- message(FATAL_ERROR "${Red}**** FATAL: Require at least gcc-${gcc_minimal_version} please set CMAKE_C[XX]_COMPILER")
- endif()
-endif(gcc_minimal_version)
-
-# Check Kernel mandatory version, will fail the configuration if required version not matched.
-if (kernel_mandatory_version)
- message (STATUS "${Cyan}-- Check kernel_mandatory_version (found kernel version ${KERNEL_VERSION})${ColourReset}")
- if (KERNEL_VERSION VERSION_LESS ${kernel_mandatory_version})
- message(FATAL_ERROR "${Red}**** FATAL: Require at least ${kernel_mandatory_version} please use a recent kernel or source your SDK environment then clean and reconfigure your CMake project.")
- endif (KERNEL_VERSION VERSION_LESS ${kernel_mandatory_version})
-endif(kernel_mandatory_version)
-
-# Check Kernel minimal version just print a Warning about missing features
-# and set a definition to be used as preprocessor condition in code to disable
-# incompatibles features.
-if (kernel_minimal_version)
- message (STATUS "${Cyan}-- Check kernel_minimal_version (found kernel version ${KERNEL_VERSION})${ColourReset}")
- if (KERNEL_VERSION VERSION_LESS ${kernel_minimal_version})
- message(WARNING "${Yellow}**** Warning: Some feature(s) require at least ${kernel_minimal_version}. Please use a recent kernel or source your SDK environment then clean and reconfigure your CMake project.${ColourReset}")
- else (KERNEL_VERSION VERSION_LESS ${kernel_minimal_version})
- add_definitions(-DKERNEL_MINIMAL_VERSION_OK)
- endif (KERNEL_VERSION VERSION_LESS ${kernel_minimal_version})
-endif(kernel_minimal_version)
+# (BUG!!!) as PKG_CONFIG_PATH does not work [should be en env variable]
+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON CACHE BOOLEAN "Flag for using prefix path")
INCLUDE(FindPkgConfig)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
INCLUDE(GNUInstallDirs)
+set(CMAKE_BUILD_TYPE Debug CACHE STRING "the type of build")
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set(CMP0048 1)
+
# Default compilation options
############################################################################
link_libraries(-Wl,--as-needed -Wl,--gc-sections)
# Compilation OPTIONS depending on language
#########################################
-
foreach(option ${COMPILE_OPTIONS})
add_compile_options(${option})
endforeach()
INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_DIRS})
# Default Linkflag
+set (PKG_TEMPLATE_PREFIX ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR} CACHE PATH "Default Package Templates Directory")
if(NOT BINDINGS_LINK_FLAG)
set(BINDINGS_LINK_FLAG "-Wl,--version-script=${PKG_TEMPLATE_PREFIX}/cmake/export.map")
endif()