cmake: Set PROTOBUF_IMPORT_DIRS in toplevel dir

The variable PROTOBUF_IMPORT_DIRS has to be set in the toplevel
CMakeLists.txt, since the import path has to be available for all .proto
files within all subdirectories. Without this addition, the
GenericExperiment will fail to compile.

Change-Id: I676e0abd83bd1c5d247afcd33e7522e72da3dc2f
This commit is contained in:
Christian Dietrich
2014-10-22 16:14:26 +02:00
parent 0317be8f8f
commit 0ba03ca97e
2 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/core)
# protoc imports refer to the same root path. Otherwise the generated
# protoc headers are not comptabile.
SET(PROTOBUF_GENERATE_CPP_APPEND_PATH FALSE)
SET(PROTOBUF_IMPORT_DIRS "/usr/include;${CMAKE_CURRENT_SOURCE_DIR}/core/comm")
SET(PROTOBUF_IMPORT_DIRS "/usr/include;${CMAKE_CURRENT_SOURCE_DIR}/core/comm"
"${CMAKE_CURRENT_BINARY_DIR}/core/comm")
# Note: CMAKE_CURRENT_BINARY_DIR is needed to find "FailConfig.hpp", which
# is generated by CMake from config/FailConfig.hpp.in and stored in