mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Hid symbols in static builds, added LTO flags, removed exports from ts
This commit is contained in:
committed by
Maksim Shabunin
parent
ef04ca9e0f
commit
6fb9d42c3f
@@ -852,7 +852,6 @@ macro(_ocv_create_module)
|
||||
${${the_module}_pch}
|
||||
${_VS_VERSION_FILE}
|
||||
)
|
||||
|
||||
set_target_properties(${the_module} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};Module")
|
||||
set_source_files_properties(${OPENCV_MODULE_${the_module}_HEADERS} ${OPENCV_MODULE_${the_module}_SOURCES} ${${the_module}_pch}
|
||||
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};Module")
|
||||
@@ -879,8 +878,13 @@ macro(_ocv_create_module)
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
||||
DEFINE_SYMBOL CVAPI_EXPORTS
|
||||
)
|
||||
|
||||
if(ANDROID AND BUILD_FAT_JAVA_LIB)
|
||||
target_compile_definitions(${the_module} PRIVATE CVAPI_EXPORTS)
|
||||
endif()
|
||||
|
||||
# For dynamic link numbering convenions
|
||||
if(NOT ANDROID)
|
||||
# Android SDK build scripts can include only .so files into final .apk
|
||||
@@ -891,11 +895,6 @@ macro(_ocv_create_module)
|
||||
)
|
||||
endif()
|
||||
|
||||
if((NOT DEFINED OPENCV_MODULE_TYPE AND BUILD_SHARED_LIBS)
|
||||
OR (DEFINED OPENCV_MODULE_TYPE AND OPENCV_MODULE_TYPE STREQUAL SHARED))
|
||||
set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
|
||||
endif()
|
||||
|
||||
if (ENABLE_GNU_STL_DEBUG)
|
||||
target_compile_definitions(${the_module} PUBLIC _GLIBCXX_DEBUG)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user