This commit is contained in:
Vitor Santos Costa
2017-06-16 11:53:46 +01:00
parent 8ac3d980c2
commit 31f1c25ee7
8 changed files with 23 additions and 190 deletions

View File

@@ -48,11 +48,13 @@ endif()
$<TARGET_FILE:itries>
$<TARGET_FILE:sys>
$<TARGET_FILE:yap_random>
$<TARGET_FILE:YAP++>
$<TARGET_FILE:YAPPython>
)
if (TARGET real)
list(APPEND python_dlls $<TARGET_FILE:real>
)
endif()
if (NOT WIN32)
list(APPEND python_dlls $<TARGET_FILE:YAP++> $<TARGET_FILE:Py4YAP>
)
endif()
@@ -76,7 +78,7 @@ add_custom_target( YAP4PY_SETUP_DIRS
)
add_custom_target( YAP4PY ALL
COMMAND ${PYTHON_EXECUTABLE} setup.py sdist bdist_wheel
COMMAND ${SWIG_EXECUTABLE} -python -modern -c++ -py3 -DX_API -I${CMAKE_SOURCE_DIR}/CXX -I${CMAKE_SOURCE_DIR}/include -I${CMAKE_SOURCE_DIR}/H -I${CMAKE_SOURCE_DIR}/H/generated -I${CMAKE_SOURCE_DIR}/OPTYap -I../../.. -o yap_wrap.cpp yap.i
COMMAND ${PYTHON_EXECUTABLE} setup.py sdist bdist_wheel
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS YAP4PY_SETUP)

View File

@@ -20,6 +20,6 @@ else:
dll = glob.glob(os.path.join(yap_lib_path,dll))[0]
dll = os.path.abspath(dll)
ctypes.CDLL(dll, mode=ctypes.RTLD_GLOBAL)
load('libYap*')
load('libYAP+*')
load('libPy4YAP*')
load('libYap*')

View File

@@ -52,20 +52,21 @@ here = os.path.abspath(os.path.dirname(__file__))
pkg_root = pjoin(here, name)
my_extra_link_args = []
if platform.system() == 'Darwin':
if platform.system() == 'Windows':
local_libs = []
win_libs = ['wsock32','ws2_32']
my_extra_link_args = ['-Wl,-export-all-symbols']
else:
# if platform.system() == 'Darwin':
my_extra_link_args = ['-Wl,-rpath', '-Wl,${_ABS_PYTHON_MODULE_PATH}']
win_libs = []
local_libs = ['YAP++','Py4YAP']
# or dll in glob('yap/dlls/*'):
# move( dll ,'lib' )
elif platform.system() == 'Windows':
local_libs = []
win_libs = ['wsock32','ws2_32']
my_extra_link_args = ['-Wl,-export-all-symbols']
cplus = ['']
bpy2yap = []
native_sources = ['yap.i']
native_sources = ['yap_wrap.cpp']
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file