@@ -7,7 +7,35 @@ set(CMAKE_CXX_STANDARD 14)
77
88## MAIN project
99project (WalkingControllers
10- VERSION 0.3.0)
10+ VERSION 0.3.1)
11+
12+ # Defines the CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_BINDIR and many other useful macros.
13+ # See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
14+ include (GNUInstallDirs )
15+
16+ # Control where libraries and executables are placed during the build.
17+ # With the following settings executables are placed in <the top level of the
18+ # build tree>/bin and libraries/archives in <top level of the build tree>/lib.
19+ # This is particularly useful to run ctests on libraries built on Windows
20+ # machines: tests, which are executables, are placed in the same folders of
21+ # dlls, which are treated as executables as well, so that they can properly
22+ # find the libraries to run. This is a because of missing RPATH on Windows.
23+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_BINDIR} " )
24+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_LIBDIR} " )
25+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /${CMAKE_INSTALL_LIBDIR} " )
26+
27+ # To build shared libraries in Windows, we set CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to TRUE.
28+ # See https://cmake.org/cmake/help/v3.4/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html
29+ # See https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/
30+ set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
31+
32+ # Under MSVC, we set CMAKE_DEBUG_POSTFIX to "d" to add a trailing "d" to library
33+ # built in debug mode. In this Windows user can compile, build and install the
34+ # library in both Release and Debug configuration avoiding naming clashes in the
35+ # installation directories.
36+ if (MSVC )
37+ set (CMAKE_DEBUG_POSTFIX "d" )
38+ endif ()
1139
1240list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /cmake)
1341
0 commit comments