File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ if (ZLIB_FOUND)
130130 list (APPEND PARTIO_LIBRARIES ZLIB::ZLIB)
131131endif ()
132132
133+ if (PARTIO_BUILD_PYTHON)
134+ find_package (Python REQUIRED COMPONENTS Interpreter Development)
135+ endif ()
136+
133137## Traverse subdirectories
134138add_subdirectory (src/lib)
135139if (PARTIO_BUILD_TOOLS)
@@ -138,7 +142,6 @@ if (PARTIO_BUILD_TOOLS)
138142 add_subdirectory (src/tools)
139143endif ()
140144if (PARTIO_BUILD_PYTHON)
141- find_package (Python REQUIRED COMPONENTS Interpreter Development)
142145 add_subdirectory (src/py)
143146endif ()
144147if (PARTIO_BUILD_DOCS)
Original file line number Diff line number Diff line change @@ -67,5 +67,7 @@ install(PROGRAMS partedit.py DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME partedit
6767install (PROGRAMS partjson.py DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME partjson)
6868install (PROGRAMS partinspect.py DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME partinspect)
6969
70- set (PYTHON_DEST "${CMAKE_INSTALL_LIBDIR} /python${Python_VERSION_MAJOR} .${Python_VERSION_MINOR} /site-packages" )
71- install (FILES partedit.py partjson.py partinspect.py DESTINATION ${PYTHON_DEST} )
70+ if (PARTIO_BUILD_PYTHON)
71+ set (PYTHON_DEST "${CMAKE_INSTALL_LIBDIR} /python${Python_VERSION_MAJOR} .${Python_VERSION_MINOR} /site-packages" )
72+ install (FILES partedit.py partjson.py partinspect.py DESTINATION ${PYTHON_DEST} )
73+ endif ()
You can’t perform that action at this time.
0 commit comments