Commit c49e0fc5 authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

check if ECM is available at the beginning to avoid issues when running compilation with asan

parent c169bb12
......@@ -305,6 +305,16 @@ set(KDE_INSTALL_DIRS_NO_DEPRECATED TRUE)
set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
set(REQUIRED_KF5_MIN_VERSION 5.7.0)
find_package(ECM ${REQUIRED_ECM_VERSION} QUIET)
if(ECM_FOUND)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
include(KDEInstallDirs)
# KDECMakeSettings expexts LIB_INSTALL_DIR set
set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR})
include(KDECMakeSettings)
include(ECMInstallIcons)
endif()
####################################################
# Add the include directories
......
......@@ -80,10 +80,6 @@ macro( marble_add_test TEST_NAME )
set_target_properties( ${TEST_NAME} PROPERTIES
COMPILE_FLAGS "-DDATA_PATH=\"\\\"${DATA_PATH}\\\"\" -DPLUGIN_PATH=\"\\\"${PLUGIN_PATH}\\\"\"" )
add_test( ${TEST_NAME} ${TEST_NAME} )
if( ECM_ENABLE_SANITIZERS )
set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.2.0.0")
endif( ECM_ENABLE_SANITIZERS )
endif( BUILD_MARBLE_TESTS )
endmacro( marble_add_test TEST_NAME )
......
find_package(ECM ${REQUIRED_ECM_VERSION} QUIET)
if(NOT ECM_FOUND)
return()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
include(KDEInstallDirs)
# KDECMakeSettings expexts LIB_INSTALL_DIR set
set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR})
include(KDECMakeSettings)
include(ECMInstallIcons)
macro_optional_find_package(KF5 ${REQUIRED_KF5_MIN_VERSION} QUIET COMPONENTS Crash NewStuff Parts CoreAddons I18n)
if(NOT KF5_FOUND)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment