Skip to content

Commit d82f15c

Browse files
committed
cmake: try to enable Stubs on Windows
1 parent 95000fe commit d82f15c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ INCLUDE(cmake/boost.cmake)
4343
INCLUDE(cmake/python.cmake)
4444
INCLUDE(cmake/ide.cmake)
4545
INCLUDE(cmake/apple.cmake)
46-
INCLUDE(CMakeDependentOption)
4746

48-
CMAKE_DEPENDENT_OPTION(GENERATE_PYTHON_STUBS "Generate the Python stubs associated to the Python library" OFF "NOT WIN32" OFF)
47+
OPTION(GENERATE_PYTHON_STUBS "Generate the Python stubs associated to the Python library" OFF)
4948

5049
STRING(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
5150

@@ -63,6 +62,16 @@ FIND_NUMPY()
6362

6463
IF(WIN32)
6564
LINK_DIRECTORIES(${PYTHON_LIBRARY_DIRS})
65+
# Set default Windows build paths
66+
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY
67+
${PROJECT_BINARY_DIR}/Bin
68+
CACHE PATH "Single directory for all libraries")
69+
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY
70+
${PROJECT_BINARY_DIR}/Bin
71+
CACHE PATH "Single directory for all executables")
72+
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
73+
${PROJECT_BINARY_DIR}/Bin
74+
CACHE PATH "Sing$le directory for all archives")
6675
ENDIF(WIN32)
6776

6877
# ----------------------------------------------------

0 commit comments

Comments
 (0)