@@ -144,6 +144,14 @@ set(libname ROOTPythonizations)
144
144
145
145
add_library (${libname} SHARED ${cpp_sources} )
146
146
147
+ # To make sure that the library also ends up in the right subdirectory in the
148
+ # build directory tree.
149
+ if (MSVC )
150
+ set_target_properties (${libname} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin/ROOT)
151
+ else ()
152
+ set_target_properties (${libname} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib/ROOT)
153
+ endif ()
154
+
147
155
# Insert the ROOTPythonizationsPySources in the dependency graph
148
156
add_dependencies (${libname} ROOTPythonizationsPySources)
149
157
@@ -187,16 +195,16 @@ target_link_libraries(PyROOT INTERFACE cppyy_backend cppyy ROOTPythonizations)
187
195
188
196
# Install library
189
197
install (TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME} Exports
190
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
191
- LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries
192
- ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries)
198
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} /ROOT COMPONENT libraries
199
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} /ROOT COMPONENT libraries
200
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} /ROOT COMPONENT libraries)
193
201
194
202
# Install meta-target PyROOT3 (INTERFACE library)
195
203
# Install library
196
204
install (TARGETS PyROOT EXPORT ${CMAKE_PROJECT_NAME} Exports
197
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
198
- LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries
199
- ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries)
205
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} /ROOT COMPONENT libraries
206
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} /ROOT COMPONENT libraries
207
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} /ROOT COMPONENT libraries)
200
208
201
209
# Install Python sources and bytecode
202
210
install (DIRECTORY ${localruntimedir} /ROOT
0 commit comments