Skip to content

Commit

Permalink
Add custom target for Python files
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 committed Aug 7, 2023
1 parent 0e532cc commit 4fe6121
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ set(PYTHON_VERSION_FILE ${PROJECT_BINARY_DIR}/lib/mrtrix3/_version.py)

find_package(Git QUIET)

file(GLOB_RECURSE PYTHON_FILES
${CMAKE_CURRENT_SOURCE_DIR}/bin/*
${CMAKE_CURRENT_SOURCE_DIR}/lib/*
)

add_custom_target(Python SOURCES
${PYTHON_FILES}
)

# We generate the version file at configure time,
# so tools like Pylint can run without building the project
execute_process(
Expand Down Expand Up @@ -37,4 +46,4 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/

install(FILES ${PYTHON_VERSION_FILE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/mrtrix3
)
)

0 comments on commit 4fe6121

Please sign in to comment.