Skip to content

Commit

Permalink
Try to fix CMake build
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed May 24, 2024
1 parent 26bd236 commit 1ca64bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ endif()
# opendds_build_helpers.cmake), and install it.
set(OPENDDS_CONFIG_AUTO_STATIC_INCLUDES 1) # Always true for CMake builds
set(config_file "dds/OpenDDSConfig.h")
set(config_out_dir "${CMAKE_CURRENT_BINARY_DIR}/opendds_config_include")
set(config_out_file "${config_out_dir}/${config_file}")
set(_OPENDDS_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/opendds_config_include" CACHE INTERNAL "")
set(config_out_file "${_OPENDDS_CONFIG_DIR}/${config_file}")
configure_file("${config_file}.in" "${config_out_file}")
add_library(OpenDDS_Config INTERFACE)
target_include_directories(OpenDDS_Config
INTERFACE
"$<BUILD_INTERFACE:${config_out_dir}>"
"$<BUILD_INTERFACE:${_OPENDDS_CONFIG_DIR}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_sources(OpenDDS_Config
INTERFACE FILE_SET HEADERS BASE_DIRS "${config_out_dir}" FILES "${config_out_file}")
INTERFACE FILE_SET HEADERS BASE_DIRS "${_OPENDDS_CONFIG_DIR}" FILES "${config_out_file}")
install(TARGETS OpenDDS_Config
EXPORT opendds_targets
FILE_SET HEADERS
Expand Down
5 changes: 5 additions & 0 deletions cmake/opendds_target_sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,11 @@ function(opendds_target_sources target)
list(APPEND opendds_options "-D${def}")
endforeach()

if(DEFINED _OPENDDS_CONFIG_DIR)
list(APPEND tao_options "-I${_OPENDDS_CONFIG_DIR}")
list(APPEND opendds_options "-I${_OPENDDS_CONFIG_DIR}")
endif()

foreach(scope PUBLIC PRIVATE INTERFACE)
if(idl_sources_${scope})
_opendds_target_idl_sources(${target}
Expand Down
2 changes: 1 addition & 1 deletion dds/DdsSecurityCore.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See: http://www.opendds.org/license.html
*/

#include "OpenDDSConfigWrapper.idl"
#include <dds/OpenDDSConfigWrapper.idl>

#if OPENDDS_CONFIG_SECURITY
#ifndef OPENDDS_DDS_SECURITY_CORE_IDL
Expand Down
2 changes: 1 addition & 1 deletion dds/DdsSecurityParams.idl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

#include "OpenDDSConfigWrapper.idl"
#include <dds/OpenDDSConfigWrapper.idl>

#if OPENDDS_CONFIG_SECURITY
#ifndef OPENDDS_DDS_SECURITY_PARAMS_IDL
Expand Down

0 comments on commit 1ca64bc

Please sign in to comment.