From daf2f4726a5bc69ee0dae47bf3818e34ad996841 Mon Sep 17 00:00:00 2001 From: Joaquim Casals <jcasals@iri.upc.edu> Date: Wed, 8 May 2019 12:40:22 +0200 Subject: [PATCH] Fixed wolfConfig and path of config.h --- CMakeLists.txt | 5 +++-- cmake_modules/wolfConfig.cmake | 8 ++++---- include/core/common/wolf.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99471e509..002d23a08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,7 @@ ELSE (Suitesparse_INCLUDE_DIRS) ENDIF (Suitesparse_INCLUDE_DIRS) # Define the directory where will be the configured config.h -SET(WOLF_CONFIG_DIR ${PROJECT_BINARY_DIR}/conf/internal) +SET(WOLF_CONFIG_DIR ${PROJECT_BINARY_DIR}/conf/core/internal) # Create the specified output directory if it does not exist. IF(NOT EXISTS "${WOLF_CONFIG_DIR}") @@ -182,6 +182,7 @@ IF(EXISTS "${WOLF_CONFIG_DIR}" AND NOT IS_DIRECTORY "${WOLF_CONFIG_DIR}") ENDIF() # Configure config.h configure_file(${CMAKE_CURRENT_SOURCE_DIR}/internal/config.h.in "${WOLF_CONFIG_DIR}/config.h") +message("WOLF CONFIG ${WOLF_CONFIG_DIR}/config.h") message("CONFIG DIRECTORY ${PROJECT_BINARY_DIR}") include_directories("${PROJECT_BINARY_DIR}/conf") # include spdlog (logging library) @@ -616,7 +617,7 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/wolfConfig.cmake" "${CMAKE_BINARY_DIR}/wolfConfig.cmake" @ONLY) INSTALL(FILES "${WOLF_CONFIG_DIR}/config.h" -DESTINATION include/iri-algorithms/wolf/internal) +DESTINATION include/iri-algorithms/wolf/plugin_core/core/internal) INSTALL(FILES "${CMAKE_BINARY_DIR}/wolfConfig.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}") diff --git a/cmake_modules/wolfConfig.cmake b/cmake_modules/wolfConfig.cmake index c9321c445..e5021aa6c 100644 --- a/cmake_modules/wolfConfig.cmake +++ b/cmake_modules/wolfConfig.cmake @@ -130,8 +130,8 @@ endif (NOT EXISTS ${CURRENT_ROOT_INSTALL_DIR}) # Set the include directories for wolf (itself). set(wolf_INCLUDE_DIR "${CURRENT_ROOT_INSTALL_DIR}/include/iri-algorithms") -# if (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/wolf.h) -if (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf) +# # if (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/wolf.h) +if (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/plugin_core) wolf_report_not_found( "wolf install root: ${CURRENT_ROOT_INSTALL_DIR}, " "determined from relative path from wolfConfig.cmake install location: " @@ -139,8 +139,8 @@ if (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf) "Either the install directory was deleted, or the install tree was only " "partially relocated outside of CMake after wolf was built.") # endif (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/wolf.h) -endif (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf) -list(APPEND wolf_INCLUDE_DIRS ${wolf_INCLUDE_DIR}/wolf) +endif (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/plugin_core) +list(APPEND wolf_INCLUDE_DIRS ${wolf_INCLUDE_DIR}/wolf/plugin_core) # Set the version. set(wolf_VERSION 0.0.1) diff --git a/include/core/common/wolf.h b/include/core/common/wolf.h index e6371f588..872364392 100644 --- a/include/core/common/wolf.h +++ b/include/core/common/wolf.h @@ -9,7 +9,7 @@ #define WOLF_H_ // Enable project-specific definitions and macros -#include "internal/config.h" +#include "core/internal/config.h" #include "core/utils/logging.h" #include "core/utils/params_server.hpp" -- GitLab