diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 1574e5d96..bfd3c6f6d 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -77,6 +77,12 @@ macro(build_module SRC MODULE_SRC) PREFIX "" SUFFIX "" ) + list(LENGTH MODULE_SRC MODULE_SRC_COUNT) + if(MODULE_SRC_COUNT LESS_EQUAL 1) + set_target_properties(${SO} PROPERTIES + UNITY_BUILD OFF + ) + endif() add_dependencies(${SO} ${PROGRAM_NAME}) if(HAVE_LOCALIZATION) add_dependencies(${SO} module_language) diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 5a4e02863..28c9518c8 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -14,6 +14,7 @@ foreach(LIBRARY IN LISTS LIBRARIES) set_target_properties(${LIBRARY_TARGET} PROPERTIES FOLDER "VendoredLibraries" PREFIX "" + UNITY_BUILD OFF ) endif() endif()