File tree Expand file tree Collapse file tree 5 files changed +27
-52
lines changed Expand file tree Collapse file tree 5 files changed +27
-52
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function(iceberg_install_cmake_package PACKAGE_NAME EXPORT_NAME)
3939 FILE "${TARGETS_CMAKE} " )
4040endfunction ()
4141
42- function (ADD_ICEBERG_LIB LIB_NAME)
42+ function (add_iceberg_lib LIB_NAME)
4343 set (options )
4444 set (one_value_args
4545 BUILD_SHARED
@@ -218,3 +218,13 @@ function(ADD_ICEBERG_LIB LIB_NAME)
218218 PARENT_SCOPE)
219219 endif ()
220220endfunction ()
221+
222+ function (iceberg_set_export_definitions STATIC_TARGET LIB_TARGETS)
223+ if (ICEBERG_BUILD_STATIC AND WIN32 )
224+ target_compile_definitions (${STATIC_TARGET} PUBLIC ICEBERG_STATIC)
225+ endif ()
226+
227+ foreach (LIB_TARGET ${LIB_TARGETS} )
228+ target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_EXPORTING)
229+ endforeach ()
230+ endfunction ()
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18- add_subdirectory (core)
19- add_subdirectory (puffin)
18+ set (ICEBERG_CORE_SOURCES core/demo_table.cc)
19+ set (ICEBERG_CORE_INCLUDES "${ICEBERG_API_DIR} " )
20+
21+ add_iceberg_lib(iceberg_core
22+ SOURCES
23+ ${ICEBERG_CORE_SOURCES}
24+ OUTPUTS
25+ ICEBERG_CORE_LIBRARIES
26+ PRIVATE_INCLUDES
27+ ${ICEBERG_CORE_INCLUDES} )
28+
29+ iceberg_set_export_definitions(iceberg_core_static "${ICEBERG_CORE_LIBRARIES} " )
30+
2031add_subdirectory (arrow)
32+ add_subdirectory (puffin)
2133
2234iceberg_install_cmake_package(Iceberg iceberg_targets)
Original file line number Diff line number Diff line change @@ -72,13 +72,7 @@ add_iceberg_lib(iceberg_arrow
7272 SHARED_INSTALL_INTERFACE_LIBS
7373 ${ICEBERG_ARROW_SHARED_INSTALL_INTERFACE_LIBS} )
7474
75- if (ICEBERG_BUILD_STATIC AND WIN32 )
76- target_compile_definitions (iceberg_arrow_static PUBLIC ICEBERG_STATIC)
77- endif ()
78-
79- foreach (LIB_TARGET ${ICEBERG_ARROW_LIBRARIES} )
80- target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_EXPORTING)
81- endforeach ()
75+ iceberg_set_export_definitions(iceberg_arrow_static "${ICEBERG_ARROW_LIBRARIES} " )
8276
8377install (FILES "${CMAKE_CURRENT_SOURCE_DIR} /demo_arrow.h"
8478 DESTINATION "${ICEBERG_INSTALL_INCLUDEDIR} /iceberg/arrow" )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,10 +26,4 @@ add_iceberg_lib(iceberg_puffin
2626 PRIVATE_INCLUDES
2727 ${ICEBERG_PUFFIN_INCLUDES} )
2828
29- if (ICEBERG_BUILD_STATIC AND WIN32 )
30- target_compile_definitions (iceberg_puffin_static PUBLIC ICEBERG_STATIC)
31- endif ()
32-
33- foreach (LIB_TARGET ${ICEBERG_PUFFIN_LIBRARIES} )
34- target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_EXPORTING)
35- endforeach ()
29+ iceberg_set_export_definitions(iceberg_puffin_static "${ICEBERG_PUFFIN_LIBRARIES} " )
You can’t perform that action at this time.
0 commit comments