Skip to content

Commit 6905648

Browse files
committed
CMake: With MSVC, put lib and tests in bin/
So that the tests can find the libary and run. Suggested by Stuart Dootson.
1 parent 8c87f2b commit 6905648

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ option (SIGCXX_DISABLE_DEPRECATED "Disable deprecated" OFF)
2828

2929
project (sigc++)
3030

31+
# On Windows/MVSC++, we need the shared library (DLL) and tests to be built in
32+
# the same directory.
33+
# (MSVC is a standard CMake variable.)
34+
if(MSVC)
35+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
36+
endif()
37+
3138
set( CMAKE_CXX_STANDARD 17 )
3239

3340
set (PROJECT_SOURCE_DIR "${sigc++_SOURCE_DIR}/sigc++")

0 commit comments

Comments
 (0)