From 3696f71cab850f673db2e0ec0cfe04feb6892e82 Mon Sep 17 00:00:00 2001 From: Christopher Lee Date: Tue, 13 Sep 2022 12:53:28 -0600 Subject: [PATCH] Only generate stubs on linux --- python/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 3f8edcf3..1ff762ce 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -34,12 +34,14 @@ set_target_properties(${COPC_PYTHON_LIB} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib) -add_custom_command(TARGET ${COPC_PYTHON_LIB} POST_BUILD - COMMAND stubgen -m _core -o . - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib - COMMENT "Generating stubs for pybind" -) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/copclib/_core.pyi DESTINATION .) +if(UNIX AND NOT APPLE) + add_custom_command(TARGET ${COPC_PYTHON_LIB} POST_BUILD + COMMAND stubgen -m _core -o . + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/copclib + COMMENT "Generating stubs for pybind" + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/copclib/_core.pyi DESTINATION .) +endif() if(WITH_TESTS) include(DownloadExampleFiles)