Skip to content

Commit

Permalink
Ensured flatc.exe is statically linked on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aardappel committed May 10, 2017
1 parent d7ac378 commit cb2481e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ if(FLATBUFFERS_BUILD_FLATC)
if(NOT FLATBUFFERS_FLATC_EXECUTABLE)
set(FLATBUFFERS_FLATC_EXECUTABLE $<TARGET_FILE:flatc>)
endif()
if(MSVC)
# Make flatc.exe not depend on runtime dlls for easy distribution.
target_compile_options(flatc PUBLIC $<$<CONFIG:Release>:/MT>)
endif()
endif()

if(FLATBUFFERS_BUILD_FLATHASH)
Expand Down

0 comments on commit cb2481e

Please sign in to comment.