@@ -144,6 +144,14 @@ set(libname ROOTPythonizations)
144144
145145add_library (${libname} SHARED ${cpp_sources} )
146146
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+
147155# Insert the ROOTPythonizationsPySources in the dependency graph
148156add_dependencies (${libname} ROOTPythonizationsPySources)
149157
@@ -187,16 +195,16 @@ target_link_libraries(PyROOT INTERFACE cppyy_backend cppyy ROOTPythonizations)
187195
188196# Install library
189197install (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)
193201
194202# Install meta-target PyROOT3 (INTERFACE library)
195203# Install library
196204install (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)
200208
201209# Install Python sources and bytecode
202210install (DIRECTORY ${localruntimedir} /ROOT
0 commit comments