Skip to content

Commit

Permalink
Add back sources of the TileDB library projects.
Browse files Browse the repository at this point in the history
On Linux CMake complains that the targets have no sources, and now it succeeds in both Linux and Windows as well.
  • Loading branch information
teo-tsirpanis committed Oct 24, 2023
1 parent 55a9985 commit 5b90604
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tiledb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ endif()
# TileDB static and shared library targets
############################################################

add_library(tiledb_shared SHARED)
add_library(tiledb_shared SHARED $<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>)

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/sm/c_api/tiledb_version.h" ver)

Expand Down Expand Up @@ -1074,12 +1074,6 @@ target_link_libraries(tiledb_shared
)

if (TILEDB_STATIC)
# Create the target
add_library(tiledb_static STATIC)
target_link_libraries(tiledb_static
PRIVATE
$<BUILD_INTERFACE:TILEDB_CORE_OBJECTS_STATIC>
)
if (WIN32)
# Copy over all include directories, compile options, etc, from the regular
# core objects.
Expand All @@ -1095,6 +1089,13 @@ if (TILEDB_STATIC)
PRIVATE
$<TARGET_PROPERTY:TILEDB_CORE_OBJECTS,INCLUDE_DIRECTORIES>
)
# Create the target
add_library(tiledb_static STATIC
$<TARGET_OBJECTS:TILEDB_CORE_OBJECTS_STATIC>)
target_link_libraries(tiledb_static
PRIVATE
$<BUILD_INTERFACE:TILEDB_CORE_OBJECTS_STATIC>
)
target_compile_definitions(tiledb_static
INTERFACE
-DTILEDB_STATIC_DEFINE
Expand Down

0 comments on commit 5b90604

Please sign in to comment.