-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix windows static library build parameter in CMakeLists.txt #1182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MiyamuraMiyako thanks for submitting this PR!
Could you please explain a bit why this is needed? I'm not so deep into msvc stuff.
Also please add a bit of inline comments what your code does and why it is needed.
@COM8 The current Cmake configuration ( if (MSVC)
if (BUILD_SHARED_LIBS)
message(STATUS "Build windows dynamic libs.")
else()
# Add this to build windows pure static library.
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
message(STATUS "Build windows static libs.")
endif()
endif() |
Thanks! From what I can see, you have not yet pushed the comment to your CMake code. You just removed some Compiler definitions. |
@COM8 Ok, I add this comment to CMakeLists.txt |
Fix windows static library build parameter in CMakeLists.txt
Use cmake parameter
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
to build windows static library.