diff --git a/libtiledbsoma/src/CMakeLists.txt b/libtiledbsoma/src/CMakeLists.txt index e383054215..ea175755d7 100644 --- a/libtiledbsoma/src/CMakeLists.txt +++ b/libtiledbsoma/src/CMakeLists.txt @@ -233,7 +233,7 @@ set(TILEDB_SOMA_EXPORT_HEADER "${TILEDB_SOMA_EXPORT_HEADER}" PARENT_SCOPE) # Set related compiler settings target_compile_definitions(TILEDB_SOMA_OBJECTS PRIVATE -DTILEDB_SOMA_OBJECTS_EXPORTS) -target_include_directories(TILEDB_SOMA_OBJECTS PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(TILEDB_SOMA_OBJECTS PRIVATE ${TILEDB_SOMA_EXPORT_HEADER_DIR}) # Add the generated header to the public headers list list(APPEND TILEDB_SOMA_PUBLIC_HEADERS diff --git a/libtiledbsoma/src/soma/logger_public.h b/libtiledbsoma/src/soma/logger_public.h index f2bfa66677..ad7281fba8 100644 --- a/libtiledbsoma/src/soma/logger_public.h +++ b/libtiledbsoma/src/soma/logger_public.h @@ -36,7 +36,14 @@ #ifndef TILEDB_LOGGER_PUBLIC_H #define TILEDB_LOGGER_PUBLIC_H -#include "../../tiledbsoma_export.h" +#ifndef TILEDBSOMA_EXPORT +// TILEDBSOMA_EXPORT is defined by the auto-generated tiledbsoma_export.h +// which is included from the top-level tiledbsoma header. We don't include +// it here to simplify the include paths (and avoid copying all headers to +// a single directory like TileDB does). In case the symbol is not defined, +// define it here as empty. +#define TILEDBSOMA_EXPORT +#endif #include // for windows: error C2039: 'runtime_error': is not a member of 'std' diff --git a/libtiledbsoma/src/tiledbsoma/tiledbsoma b/libtiledbsoma/src/tiledbsoma/tiledbsoma index 2dcfd7b62a..e8c967bbdf 100644 --- a/libtiledbsoma/src/tiledbsoma/tiledbsoma +++ b/libtiledbsoma/src/tiledbsoma/tiledbsoma @@ -33,8 +33,10 @@ #ifndef __TILEDBSOMA__ #define __TILEDBSOMA__ +// Auto-generated file by CMake, used to define the TILEDBSOMA_EXPORT macro +// to allow exporting symbols in a cross-platform fashion. #include "tiledbsoma_export.h" -#include "utils/arrow_adapter.h" + #include "utils/common.h" #include "utils/stats.h" #include "utils/version.h"