Skip to content

Commit 2bd2642

Browse files
committed
added packaging for mac
1 parent 7e52bbd commit 2bd2642

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,18 @@ add_test(NAME pytest
100100
COMMAND ${Python3_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR}/python
101101
)
102102

103+
if (UNIX)
103104
add_custom_target(pip_package
104105
COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/dist && ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/setup.py sdist bdist_wheel && cp -r ${CMAKE_SOURCE_DIR}/python/dist ${CMAKE_CURRENT_BINARY_DIR}/ && rm -r ${CMAKE_SOURCE_DIR}/python/dist ${CMAKE_SOURCE_DIR}/python/build
105106
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/python
106107
DEPENDS install)
108+
endif()
109+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
110+
add_custom_target(pip_package
111+
COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/dist && ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/setup.py sdist bdist_wheel --plat-name=macosx_11_0_arm64 && cp -r ${CMAKE_SOURCE_DIR}/python/dist ${CMAKE_CURRENT_BINARY_DIR}/ && rm -r ${CMAKE_SOURCE_DIR}/python/dist ${CMAKE_SOURCE_DIR}/python/build
112+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/python
113+
DEPENDS install)
114+
endif()
107115

108116
##############################
109117
### STDLIBDOC ###

0 commit comments

Comments
 (0)