cmake_minimum_required(VERSION 3.0) project(damaris-backends) include(FindPkgConfig) include(GNUInstallDirs) # http://stackoverflow.com/questions/39481958/setting-cmake-install-prefix-from-cmakelists-txt-file #IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # SET(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "Set install prefix" FORCE) #ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow -Wall -O0 -g") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -Wshadow -Wall -O0 -g") #set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow -Wall -O0 -g -DSP_DEBUG -DSPC_DEBUG") set(CPACK_PACKAGING_INSTALL_PREFIX "/") #set(CMAKE_INSTALL_PREFIX "/") find_package(EXPAT REQUIRED) find_package(PkgConfig REQUIRED) pkg_check_modules (GLIB2 glib-2.0 REQUIRED) pkg_check_modules (XERCES xerces-c REQUIRED) include_directories (. ${GLIB2_INCLUDE_DIRS} ${XERCES_INCLUDE_DIRS}) link_directories (${GLIB2_LIBRARY_DIRS} ${XERCES_LIBRARY_DIRS}) add_subdirectory(core) #add_subdirectory(doc) add_subdirectory(drivers) add_subdirectory(tools) #add_subdirectory(tests) add_subdirectory(machines) #add_executable(backends ${SOURCE_FILES})