1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 12:16:40 +08:00

Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS

Fixes: #20775
This commit is contained in:
Kyle Edwards
2020-05-29 15:28:43 -04:00
parent 1e4aaa31dd
commit 6fc4bfa11c
2 changed files with 4 additions and 1 deletions

View File

@@ -2529,7 +2529,8 @@ void cmGeneratorTarget::ComputeModuleDefinitionInfo(
info.DefFileGenerated = false;
#endif
if (info.DefFileGenerated) {
info.DefFile = this->ObjectDirectory /* has slash */ + "exports.def";
info.DefFile =
this->GetObjectDirectory(config) /* has slash */ + "exports.def";
} else if (!info.Sources.empty()) {
info.DefFile = info.Sources.front()->GetFullPath();
}

View File

@@ -1,5 +1,7 @@
enable_language(C)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
file(TOUCH ${CMAKE_BINARY_DIR}/empty.cmake)
include(${CMAKE_BINARY_DIR}/empty.cmake)