Skip to content

Commit f56bafc

Browse files
committed
refactor cmake
1 parent cbf4e22 commit f56bafc

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

cpp/src/arrow/CMakeLists.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,13 @@ if(ARROW_JSON)
987987
set(ARROW_SIMDJSON_IMPL_SRC "")
988988
if(TARGET simdjson::simdjson)
989989
get_target_property(SIMDJSON_TARGET_TYPE simdjson::simdjson TYPE)
990+
get_target_property(SIMDJSON_INTERFACE_DEFINITIONS simdjson::simdjson
991+
INTERFACE_COMPILE_DEFINITIONS)
992+
if(SIMDJSON_INTERFACE_DEFINITIONS)
993+
if("SIMDJSON_HEADER_ONLY" IN_LIST SIMDJSON_INTERFACE_DEFINITIONS)
994+
set(ARROW_SIMDJSON_IMPL_SRC json/simdjson_impl.cc)
995+
endif()
996+
endif()
990997
if(SIMDJSON_TARGET_TYPE STREQUAL "INTERFACE_LIBRARY")
991998
set(ARROW_SIMDJSON_IMPL_SRC json/simdjson_impl.cc)
992999
else()
@@ -998,8 +1005,17 @@ if(ARROW_JSON)
9981005
IMPORTED_LOCATION_DEBUG)
9991006
get_target_property(SIMDJSON_IMPORTED_LOCATION_RELEASE simdjson::simdjson
10001007
IMPORTED_LOCATION_RELEASE)
1001-
if(NOT SIMDJSON_IMPORTED_LOCATION AND NOT SIMDJSON_IMPORTED_LOCATION_DEBUG AND
1002-
NOT SIMDJSON_IMPORTED_LOCATION_RELEASE)
1008+
get_target_property(SIMDJSON_IMPORTED_IMPLIB simdjson::simdjson IMPORTED_IMPLIB)
1009+
get_target_property(SIMDJSON_IMPORTED_IMPLIB_DEBUG simdjson::simdjson
1010+
IMPORTED_IMPLIB_DEBUG)
1011+
get_target_property(SIMDJSON_IMPORTED_IMPLIB_RELEASE simdjson::simdjson
1012+
IMPORTED_IMPLIB_RELEASE)
1013+
if(NOT SIMDJSON_IMPORTED_LOCATION
1014+
AND NOT SIMDJSON_IMPORTED_LOCATION_DEBUG
1015+
AND NOT SIMDJSON_IMPORTED_LOCATION_RELEASE
1016+
AND NOT SIMDJSON_IMPORTED_IMPLIB
1017+
AND NOT SIMDJSON_IMPORTED_IMPLIB_DEBUG
1018+
AND NOT SIMDJSON_IMPORTED_IMPLIB_RELEASE)
10031019
set(ARROW_SIMDJSON_IMPL_SRC json/simdjson_impl.cc)
10041020
endif()
10051021
endif()

0 commit comments

Comments
 (0)