summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/AndroidTestUtilities/PushToAndroidDevice.cmake2
-rw-r--r--Modules/AutogenInfo.cmake.in8
-rw-r--r--Modules/BundleUtilities.cmake58
-rw-r--r--Modules/FindBoost.cmake39
-rw-r--r--Modules/FindGTest.cmake14
-rw-r--r--Modules/FindOpenSSL.cmake13
-rw-r--r--Modules/FindPostgreSQL.cmake7
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake10
-rw-r--r--Modules/Platform/Android-Clang-ASM.cmake2
-rw-r--r--Modules/Platform/Android-Clang.cmake4
-rw-r--r--Modules/UseSWIG.cmake1
11 files changed, 124 insertions, 34 deletions
diff --git a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
index f5f2564..d8ca730 100644
--- a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
+++ b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
@@ -117,7 +117,7 @@ function(android_push_test_files_to_device)
check_device_file_exists(${_ptd_DEV_TEST_DIR} test_dir_exists)
if(test_dir_exists)
# This is protected in the SetupProjectTests module.
- execute_adb_command(shell echo rm -r ${_ptd_DEV_TEST_DIR} | su)
+ execute_adb_command(shell rm -r ${_ptd_DEV_TEST_DIR})
endif()
execute_adb_command(shell mkdir -p ${_ptd_DEV_TEST_DIR})
diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in
index 84b0f4d..3fafaff 100644
--- a/Modules/AutogenInfo.cmake.in
+++ b/Modules/AutogenInfo.cmake.in
@@ -1,7 +1,7 @@
-set(AM_SOURCES @_cpp_files@ )
-set(AM_SKIP_MOC @_skip_moc@ )
-set(AM_SKIP_UIC @_skip_uic@ )
-set(AM_HEADERS @_moc_headers@ )
+set(AM_SOURCES @_moc_uic_sources@)
+set(AM_HEADERS @_moc_uic_headers@)
+set(AM_SKIP_MOC @_skip_moc@)
+set(AM_SKIP_UIC @_skip_uic@)
set(AM_MOC_COMPILE_DEFINITIONS @_moc_compile_defs@)
set(AM_MOC_INCLUDES @_moc_incs@)
set(AM_MOC_OPTIONS @_moc_options@)
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index b1610e2..5d6f402 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -624,6 +624,33 @@ function(get_bundle_keys app libs dirs keys_var)
endif()
endforeach()
+ # preserve library symlink structure
+ foreach(key ${${keys_var}})
+ if("${${key}_COPYFLAG}" STREQUAL 1)
+ if(IS_SYMLINK "${${key}_RESOLVED_ITEM}")
+ get_filename_component(target "${${key}_RESOLVED_ITEM}" REALPATH)
+ set_bundle_key_values(${keys_var} "${exe}" "${target}" "${exepath}" "${dirs}" 1 "${exe_rpaths}")
+ get_item_key("${target}" targetkey)
+
+ if(WIN32)
+ # ignore case on Windows
+ string(TOLOWER "${${key}_RESOLVED_ITEM}" resolved_item_compare)
+ string(TOLOWER "${${targetkey}_RESOLVED_EMBEDDED_ITEM}" resolved_embedded_item_compare)
+ else()
+ set(resolved_item_compare "${${key}_RESOLVED_ITEM}")
+ set(resolved_embedded_item_compare "${${targetkey}_RESOLVED_EMBEDDED_ITEM}")
+ endif()
+ get_filename_component(resolved_item_compare "${resolved_item_compare}" NAME)
+ get_filename_component(resolved_embedded_item_compare "${resolved_embedded_item_compare}" NAME)
+
+ if(NOT "${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}")
+ set(${key}_COPYFLAG "2")
+ set(${key}_RESOLVED_ITEM "${${targetkey}_RESOLVED_EMBEDDED_ITEM}")
+ endif()
+
+ endif()
+ endif()
+ endforeach()
# Propagate values to caller's scope:
#
set(${keys_var} ${${keys_var}} PARENT_SCOPE)
@@ -640,6 +667,24 @@ function(get_bundle_keys app libs dirs keys_var)
endif()
endfunction()
+function(link_resolved_item_into_bundle resolved_item resolved_embedded_item)
+ if(WIN32)
+ # ignore case on Windows
+ string(TOLOWER "${resolved_item}" resolved_item_compare)
+ string(TOLOWER "${resolved_embedded_item}" resolved_embedded_item_compare)
+ else()
+ set(resolved_item_compare "${resolved_item}")
+ set(resolved_embedded_item_compare "${resolved_embedded_item}")
+ endif()
+
+ if("${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}")
+ message(STATUS "warning: resolved_item == resolved_embedded_item - not linking...")
+ else()
+ get_filename_component(target_dir "${resolved_embedded_item}" DIRECTORY)
+ file(RELATIVE_PATH symlink_target "${target_dir}" "${resolved_item}")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${symlink_target}" "${resolved_embedded_item}")
+ endif()
+endfunction()
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
if(WIN32)
@@ -854,7 +899,9 @@ function(fixup_bundle app libs dirs)
set(i 0)
foreach(key ${keys})
math(EXPR i ${i}+1)
- if(${${key}_COPYFLAG})
+ if("${${key}_COPYFLAG}" STREQUAL "2")
+ message(STATUS "${i}/${n}: linking '${${key}_RESOLVED_ITEM}' -> '${${key}_RESOLVED_EMBEDDED_ITEM}'")
+ elseif(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: copying '${${key}_RESOLVED_ITEM}'")
else()
message(STATUS "${i}/${n}: *NOT* copying '${${key}_RESOLVED_ITEM}'")
@@ -872,7 +919,10 @@ function(fixup_bundle app libs dirs)
message(STATUS "")
endif()
- if(${${key}_COPYFLAG})
+ if("${${key}_COPYFLAG}" STREQUAL "2")
+ link_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
+ "${${key}_RESOLVED_EMBEDDED_ITEM}")
+ elseif(${${key}_COPYFLAG})
set(item "${${key}_ITEM}")
if(item MATCHES "[^/]+\\.framework/")
copy_resolved_framework_into_bundle("${${key}_RESOLVED_ITEM}"
@@ -889,7 +939,9 @@ function(fixup_bundle app libs dirs)
math(EXPR i ${i}+1)
if(APPLE)
message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'")
- fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}")
+ if(NOT "${${key}_COPYFLAG}" STREQUAL "2")
+ fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}")
+ endif()
else()
message(STATUS "${i}/${n}: fix-up not required on this platform '${${key}_RESOLVED_EMBEDDED_ITEM}'")
endif()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index e6bf3dc..266d135 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -742,6 +742,21 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106400)
+ set(_Boost_CHRONO_DEPENDENCIES system)
+ set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+ set(_Boost_FILESYSTEM_DEPENDENCIES system)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+ set(_Boost_RANDOM_DEPENDENCIES system)
+ set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
else()
message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}")
set(_Boost_IMPORTED_TARGETS FALSE)
@@ -877,7 +892,7 @@ endfunction()
# This function would append corresponding directories if MSVC is a current compiler,
# so having `BOOST_ROOT` would be enough to specify to find everything.
#
-macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir)
+macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir)
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_arch_suffix 64)
@@ -885,19 +900,19 @@ macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar base
set(_arch_suffix 32)
endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-15.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-15.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-14.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-12.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-12.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-11.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-11.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-10.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-10.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-9.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-9.0)
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
- list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-8.0)
+ list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0)
endif()
endif()
endmacro()
@@ -948,7 +963,7 @@ else()
# _Boost_COMPONENT_HEADERS. See the instructions at the top of
# _Boost_COMPONENT_DEPENDENCIES.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
- "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+ "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
"1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"
@@ -1361,10 +1376,10 @@ foreach(c DEBUG RELEASE)
if(BOOST_ROOT)
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib)
- _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} BOOST_ROOT)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${BOOST_ROOT}")
elseif(_ENV_BOOST_ROOT)
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib)
- _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} _ENV_BOOST_ROOT)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${_ENV_BOOST_ROOT}")
endif()
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c}
@@ -1372,6 +1387,7 @@ foreach(c DEBUG RELEASE)
${Boost_INCLUDE_DIR}/../lib
${Boost_INCLUDE_DIR}/stage/lib
)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
if( Boost_NO_SYSTEM_PATHS )
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else()
@@ -1380,6 +1396,7 @@ foreach(c DEBUG RELEASE)
C:/boost
/sw/local/lib
)
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost")
endif()
endif()
endforeach()
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index 76ab716..6540171 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -49,8 +49,8 @@
# The root directory of the Google Test installation (may also be
# set as an environment variable)
# ``GTEST_MSVC_SEARCH``
-# If compiling with MSVC, this variable can be set to ``MD`` or
-# ``MT`` (the default) to enable searching a GTest build tree
+# If compiling with MSVC, this variable can be set to ``MT`` or
+# ``MD`` (the default) to enable searching a GTest build tree
#
#
# Example usage
@@ -160,11 +160,17 @@ if(MSVC)
if(GTEST_MSVC_SEARCH STREQUAL "MD")
list(APPEND _gtest_libpath_suffixes
msvc/gtest-md/Debug
- msvc/gtest-md/Release)
+ msvc/gtest-md/Release
+ msvc/x64/Debug
+ msvc/x64/Release
+ )
elseif(GTEST_MSVC_SEARCH STREQUAL "MT")
list(APPEND _gtest_libpath_suffixes
msvc/gtest/Debug
- msvc/gtest/Release)
+ msvc/gtest/Release
+ msvc/x64/Debug
+ msvc/x64/Release
+ )
endif()
endif()
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 30fc5c6..6259ce1 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -204,7 +204,6 @@ if(WIN32 AND NOT CYGWIN)
SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE)
set(OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} )
set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} )
- set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
elseif(MINGW)
# same player, for MinGW
set(LIB_EAY_NAMES crypto libeay32)
@@ -232,7 +231,6 @@ if(WIN32 AND NOT CYGWIN)
mark_as_advanced(SSL_EAY LIB_EAY)
set(OPENSSL_SSL_LIBRARY ${SSL_EAY} )
set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} )
- set(OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
unset(LIB_EAY_NAMES)
unset(SSL_EAY_NAMES)
else()
@@ -264,7 +262,6 @@ if(WIN32 AND NOT CYGWIN)
mark_as_advanced(SSL_EAY LIB_EAY)
set(OPENSSL_SSL_LIBRARY ${SSL_EAY} )
set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} )
- set(OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
endif()
else()
@@ -298,8 +295,6 @@ else()
set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
- set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
-
endif()
function(from_hex HEX DEC)
@@ -371,10 +366,13 @@ endif ()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
+
if (OPENSSL_VERSION)
find_package_handle_standard_args(OpenSSL
REQUIRED_VARS
- OPENSSL_LIBRARIES
+ OPENSSL_SSL_LIBRARY
+ OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR
VERSION_VAR
OPENSSL_VERSION
@@ -383,7 +381,8 @@ if (OPENSSL_VERSION)
)
else ()
find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
- OPENSSL_LIBRARIES
+ OPENSSL_SSL_LIBRARY
+ OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR
)
endif ()
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 874128c..9e2194c 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -88,8 +88,13 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS})
"PostgreSQL/${suffix}/include/server")
endif()
if(UNIX)
+ list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES
+ "pgsql-${suffix}/lib")
+ list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES
+ "pgsql-${suffix}/include")
list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES
- "postgresql/${suffix}/server")
+ "postgresql/${suffix}/server"
+ "pgsql-${suffix}/include/server")
endif()
endforeach()
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index b0446c9..f4ae091 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -182,7 +182,10 @@ if(MSVC)
"${MSVC${v}_CRT_DIR}/msvcp${v}0.dll"
)
if(NOT v VERSION_LESS 14)
- list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll")
+ list(APPEND __install__libs
+ "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll"
+ "${MSVC${v}_CRT_DIR}/concrt${v}0.dll"
+ )
else()
list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll")
endif()
@@ -197,7 +200,10 @@ if(MSVC)
"${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll"
)
if(NOT v VERSION_LESS 14)
- list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll")
+ list(APPEND __install__libs
+ "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll"
+ "${MSVC${v}_CRT_DIR}/concrt${v}0d.dll"
+ )
else()
list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll")
endif()
diff --git a/Modules/Platform/Android-Clang-ASM.cmake b/Modules/Platform/Android-Clang-ASM.cmake
new file mode 100644
index 0000000..6448da6
--- /dev/null
+++ b/Modules/Platform/Android-Clang-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/Android-Clang)
+__android_compiler_clang(ASM)
diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake
index f0cf4a5..f739ab1 100644
--- a/Modules/Platform/Android-Clang.cmake
+++ b/Modules/Platform/Android-Clang.cmake
@@ -35,7 +35,9 @@ include(Platform/Android-Common)
include(Platform/Android/abi-${CMAKE_ANDROID_ARCH_ABI}-Clang)
macro(__android_compiler_clang lang)
- __android_compiler_common(${lang})
+ if(NOT "x${lang}" STREQUAL "xASM")
+ __android_compiler_common(${lang})
+ endif()
if(NOT CMAKE_${lang}_COMPILER_TARGET)
set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}")
endif()
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 651f9f1..ffb72a0 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -212,6 +212,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
"${swig_source_file_fullname}"
MAIN_DEPENDENCY "${swig_source_file_fullname}"
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
+ IMPLICIT_DEPENDS CXX "${swig_source_file_fullname}"
COMMENT "Swig source")
set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
PROPERTIES GENERATED 1)