Skip to content

Commit f162c08

Browse files
committed
Merge pull request opencv#17987 from mshabunin:fix-xcode-carotene
2 parents 0d1d452 + 866468c commit f162c08

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

3rdparty/carotene/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ if(WITH_NEON)
4040
target_compile_definitions(carotene_objs PRIVATE "-DWITH_NEON")
4141
endif()
4242

43-
add_library(carotene STATIC EXCLUDE_FROM_ALL "$<TARGET_OBJECTS:carotene_objs>")
43+
# we add dummy file to fix XCode build
44+
add_library(carotene STATIC EXCLUDE_FROM_ALL "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")

3rdparty/carotene/hal/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${carotene_defs})
8080
# set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000")
8181
endif()
8282

83-
add_library(tegra_hal STATIC $<TARGET_OBJECTS:carotene_objs>)
83+
# we add dummy file to fix XCode build
84+
add_library(tegra_hal STATIC $<TARGET_OBJECTS:carotene_objs> "dummy.cpp")
8485
set_target_properties(tegra_hal PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH})
8586
set(OPENCV_SRC_DIR "${CMAKE_SOURCE_DIR}")
8687
if(NOT BUILD_SHARED_LIBS)

3rdparty/carotene/hal/dummy.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This file is needed for compilation on some platforms e.g. with XCode generator
2+
// Related issue: https://gitlab.kitware.com/cmake/cmake/-/issues/17457

3rdparty/carotene/src/dummy.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This file is needed for compilation on some platforms e.g. with XCode generator
2+
// Related issue: https://gitlab.kitware.com/cmake/cmake/-/issues/17457

0 commit comments

Comments
 (0)