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 23, 2023
1 parent bc2abf2 commit d65cb71
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 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 All @@ -1106,6 +1107,7 @@ if (TILEDB_STATIC)
OUTPUT_NAME "tiledbstatic"
)
else()
add_library(tiledb_static STATIC $<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>)
set_target_properties(tiledb_static
PROPERTIES
OUTPUT_NAME "tiledb"
Expand Down

0 comments on commit d65cb71

Please sign in to comment.