From 02923360b5aa448589d7441939b6d366d336a254 Mon Sep 17 00:00:00 2001 From: Dominik Drexler Date: Thu, 11 Jan 2024 00:03:37 +0100 Subject: [PATCH] added header files to target for better ide support --- CMakeLists.txt | 2 ++ exe/CMakeLists.txt | 1 - include/loki/common/ast/config.hpp | 2 ++ src/CMakeLists.txt | 15 ++++++++++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4707a460..cd7811ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,8 @@ configure_boost() # set(CMAKE_FIND_DEBUG_MODE ON) # set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") +include_directories("${CMAKE_PREFIX_PATH}/include") +message("${CMAKE_PREFIX_PATH}/include") find_package(Boost ${BOOST_MIN_VERSION} REQUIRED) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) diff --git a/exe/CMakeLists.txt b/exe/CMakeLists.txt index e76bdef3..eed189ab 100644 --- a/exe/CMakeLists.txt +++ b/exe/CMakeLists.txt @@ -3,4 +3,3 @@ target_link_libraries(domain loki::parsers) add_executable(problem "problem.cpp") target_link_libraries(problem loki::parsers) - diff --git a/include/loki/common/ast/config.hpp b/include/loki/common/ast/config.hpp index 30bc09e6..5a7ea21b 100644 --- a/include/loki/common/ast/config.hpp +++ b/include/loki/common/ast/config.hpp @@ -22,6 +22,8 @@ #include #include +#include + /// @brief Defines types of our parsers. /// The configuration is relevant when reusing the parsers instantiated by the library. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4ad6e396..9b5f069f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,16 @@ +file(GLOB HEADER_FILES + "../include/loki/common/*.hpp" + "../include/loki/common/ast/*.hpp" + "../include/loki/common/pddl/*.hpp" + "../include/loki/common/pddl/parser/*.hpp" + "../include/loki/domain/*.hpp" + "../include/loki/domain/ast/*.hpp" + "../include/loki/domain/pddl/*.hpp" + "../include/loki/domain/pddl/parser/*.hpp" + "../include/loki/problem/*.hpp" + "../include/loki/problem/ast/*.hpp" + "../include/loki/problem/pddl/*.hpp" + "../include/loki/problem/pddl/parser/*.hpp") file(GLOB SRC_FILES "common/*.cpp" "common/ast/*.cpp" @@ -11,7 +24,7 @@ file(GLOB SRC_FILES "problem/ast/*.cpp" "problem/pddl/*.cpp" "problem/pddl/parser/*.cpp") -add_library(parsers STATIC ${SRC_FILES}) +add_library(parsers STATIC ${SRC_FILES} ${HEADER_FILES}) set_target_properties(parsers PROPERTIES OUTPUT_NAME loki_parsers) # target_link_libraries(parsers PRIVATE flatbuffers)