Skip to content

Commit 7c47ad3

Browse files
committed
Align better with existing style.
1 parent ab88b42 commit 7c47ad3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set(OPENPNP_CAPTURE_LIB_SOVERSION "0" CACHE STRING "openpnp-capture library sove
1818
# Library type options
1919
option(BUILD_SHARED_LIBS "Build shared library" ON)
2020
option(BUILD_STATIC_LIBS "Build static library" OFF)
21+
option(LINK_DYNAMIC_MSVC_RUNTIME "Link MSVC runtime statically" OFF)
2122

2223
# Validate library type options
2324
if(BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
@@ -93,7 +94,7 @@ set_target_properties(openpnp-capture PROPERTIES
9394

9495
IF (WIN32)
9596
if(MSVC)
96-
if(OPENPNP_CAPTURE_MSVC_MD)
97+
if(LINK_DYNAMIC_MSVC_RUNTIME)
9798
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
9899
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
99100
else()

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ Documentation for openpnp-capture needs improvement. We would love your [help!](
5353
## Build instructions (Windows)
5454
Run the batch file 'bootstrap.bat' and choose the desired build system (VisualStudio/nmake or Ninja). Make sure the compiler (Visual Studio) is in the search path.
5555

56-
By default the MSVC runtime library are linked statically, aka `\MT` or "Multithreaded", and thus bundled with openpnp-capture. If instead the MSVC runtime library should be linked dynamically, aka `\MD` or "MultithreadedDLL", set the CMake variable `OPENPNP_CAPTURE_MSVC_MD` to `ON`.
57-
5856
Go to the build directory and run nmake or ninja to build the library and the test application.
5957

6058
## Build instructions (OSX)

README_BUILD.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -G
4545

4646
- `BUILD_SHARED_LIBS`: Build shared library (default: ON)
4747
- `BUILD_STATIC_LIBS`: Build static library (default: OFF)
48+
- `LINK_DYNAMIC_MSVC_RUNTIME`: Link MSVC runtime statically, aka `\MD`. Otherwise `\MT`. (default: OFF)
4849

4950
**Note**: If both options are enabled, the build will default to static library with a warning.
5051

0 commit comments

Comments
 (0)