Skip to content

Commit c0c2ca1

Browse files
authored
Remove support for experimental/custom cmake + visual studio. NFC (#20901)
This support was added in 2013 but never maintained or tested so I assume it was never completed. An additional motivation for removing this is that it it should allow the removal of `--default-obj-ext`.
1 parent a9a823e commit c0c2ca1

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

cmake/Modules/Platform/Emscripten.cmake

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -354,35 +354,6 @@ function(em_link_post_js target)
354354
em_add_link_deps(${target} "--post-js" ${ARGN})
355355
endfunction()
356356

357-
# Experimental support for targeting generation of Visual Studio project files
358-
# (vs-tool) of Emscripten projects for Windows. To use this, pass the
359-
# combination -G "Visual Studio 10" -DCMAKE_TOOLCHAIN_FILE=Emscripten.cmake
360-
if ("${CMAKE_GENERATOR}" MATCHES "^Visual Studio.*")
361-
# By default, CMake generates VS project files with a
362-
# <GenerateManifest>true</GenerateManifest> directive.
363-
# This causes VS to attempt to invoke rc.exe during the build, which will fail
364-
# since app manifests are meaningless for Emscripten. To disable this, add
365-
# the following linker flag. This flag will not go to emcc, since the Visual
366-
# Studio CMake generator will swallow it.
367-
set(EMSCRIPTEN_VS_LINKER_FLAGS "/MANIFEST:NO")
368-
# CMake is hardcoded to write a ClCompile directive
369-
# <ObjectFileName>$(IntDir)</ObjectFileName> in all VS project files it
370-
# generates. This makes VS pass emcc a -o param that points to a directory
371-
# instead of a file, which causes emcc autogenerate the output filename.
372-
# CMake is hardcoded to assume all object files have the suffix .obj, so
373-
# adjust the emcc-autogenerated default suffix name to match.
374-
set(EMSCRIPTEN_VS_LINKER_FLAGS "${EMSCRIPTEN_VS_LINKER_FLAGS} --default-obj-ext .obj")
375-
# Also hint CMake that it should not hardcode <ObjectFileName> generation.
376-
# Requires a custom CMake build for this to work (ignored on others)
377-
# See http://www.cmake.org/Bug/view.php?id=14673 and https://github.com/juj/CMake
378-
set(CMAKE_VS_NO_DEFAULT_OBJECTFILENAME 1)
379-
380-
# Apply and cache Emscripten Visual Studio IDE-specific linker flags.
381-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "")
382-
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "")
383-
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "")
384-
endif()
385-
386357
if (NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
387358
find_program(NODE_JS_EXECUTABLE NAMES nodejs node)
388359
if(NODE_JS_EXECUTABLE)

0 commit comments

Comments
 (0)