Some 8 cmake patches were necessary to get libalkimia detection right. This just copies the current state of 4.8 branch. --- a/CMakeLists.txt 2016-10-26 12:17:23.390317411 +0200 +++ b/CMakeLists.txt 2016-10-26 12:17:53.750544101 +0200 @@ -110,14 +110,21 @@ add_custom_target(apidoc ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/kmymoney.doxygen) endif(DOXYGEN_FOUND) -find_package(LibAlkimia 4.3.2 REQUIRED) +find_package(LibAlkimia REQUIRED) #TODO: remove when LibAlkimia minimum version will be raised if (NOT LIBALKIMIA_LIBRARIES AND LIBALKIMIA_LIBRARY) # LibAlkimia 4.3.2 does not properly define LIBALKIMIA_LIBRARIES find_package(GMP REQUIRED) set(LIBALKIMIA_LIBRARIES ${GMP_LIBRARIES} ${LIBALKIMIA_LIBRARY} ) endif() - +# make sure we have the matching version of LibAlkimia (not too new) +if(${LibAlkimia_FOUND}) + if (DEFINED ${LibAlkimia_VERSION}) + if (NOT "${LibAlkimia_VERSION}" VERSION_LESS "6.0.0") + message(FATAL_ERROR "This version of KMyMoney requires LibAlkimia < 6.0.0 and does not work with the installed version of LibAlkimia") + endif() + endif() +endif() # check for PkgConfig find_package(PkgConfig)