diff options
author | Peter Lemanski <[email protected]> | 2025-05-23 03:54:03 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2025-05-23 12:54:03 +0200 |
commit | d2aed87f5eed3f163a48176cedc41a2f5d1fc749 (patch) | |
tree | ecc228a9bf590d9960d9045cab128dee9013d3cc | |
parent | 315075c4a6bb3edcf84cafedffba6a1b8f97763d (diff) |
Fix issue compiling when assimp added as subdirectory and parent project defines /utf-8 compile flag (#6186)HEADupstream/master
Co-authored-by: Kim Kulling <[email protected]>
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 517a957f4..e1fd051c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,8 +347,11 @@ ELSEIF(MSVC) elseif((GENERATOR_IS_MULTI_CONFIG) OR (CMAKE_BUILD_TYPE MATCHES Release)) message("-- MSVC PDB generation disabled. Release binary will not be debuggable.") endif() - # Source code is encoded in UTF-8 - ADD_COMPILE_OPTIONS(/source-charset:utf-8) + if(NOT /utf-8 IN_LIST CMAKE_CXX_FLAGS) + # Source code is encoded in UTF-8 + ADD_COMPILE_OPTIONS(/source-charset:utf-8) + endif () + ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) IF(NOT ASSIMP_HUNTER_ENABLED) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) |