Skip to content

Commit 8716053

Browse files
committed
Fix build configuration for mac and win
1 parent 15b39d6 commit 8716053

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

native/src/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,19 @@ SET_CEF_TARGET_OUT_DIR()
217217
# CMAKE_LIBRARY_OUTPUT_DIRECTORY for Makefiles/Ninja generators, so redirecting
218218
# CEF_TARGET_OUT_DIR alone is not enough - both must be set here, after the
219219
# macro call, to actually take effect for add_library/add_executable below.
220+
# Multi-config generators (Xcode, Visual Studio) auto-append a /<CONFIG>
221+
# subfolder to the plain (non-per-config) variable, so the *_DEBUG/*_RELEASE
222+
# variants must be set explicitly too, or binaries end up one level deeper
223+
# than CEF_TARGET_OUT_DIR (e.g. .../win/Release/ceffx_helper.exe instead of
224+
# .../win/ceffx_helper.exe), breaking every custom command that references
225+
# CEF_TARGET_OUT_DIR directly (manifest embedding, bundle copying, etc.).
220226
set(CEF_TARGET_OUT_DIR "${CMAKE_BINARY_DIR}/Release/${NATIVES_CLASSIFIER}")
221227
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
228+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CEF_TARGET_OUT_DIR})
229+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CEF_TARGET_OUT_DIR})
222230
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR})
231+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CEF_TARGET_OUT_DIR})
232+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CEF_TARGET_OUT_DIR})
223233

224234

225235
#

0 commit comments

Comments
 (0)