From e68630cd8aeb022c4465aa8a72fc4adaa000b3ec Mon Sep 17 00:00:00 2001 From: vsc Date: Tue, 13 Jun 2017 22:02:22 +0100 Subject: [PATCH] packaging --- packages/python/swig/CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/python/swig/CMakeLists.txt b/packages/python/swig/CMakeLists.txt index 5b325f180..d6c40019c 100644 --- a/packages/python/swig/CMakeLists.txt +++ b/packages/python/swig/CMakeLists.txt @@ -20,15 +20,19 @@ INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/CXX") SET_SOURCE_FILES_PROPERTIES(../../swig/yap.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(../../swig/yap.i PROPERTIES SWIG_FLAGS "-O;-py3") -SET_SOURCE_FILES_PROPERTIES(../../swiyap.i PROPERTIES SWIG_MODULE_NAME yap) -#SET_SOURCE_FILES_PROPERTIES(../../swi/yap.i PROPERTIES OUTPUT_NAME yap) +SET_SOURCE_FILES_PROPERTIES(../../swig/yap.i PROPERTIES SWIG_MODULE_NAME yap) -set(SYS_DLLS /mingw64/bin/libgcc_s_seh-1.dll - /mingw64/bin/libgmp-10.dll - /mingw64/bin/libstdc++-6.dll - /mingw64/bin/libwinpthread-1.dll +if (WIN32) - ) +set (SYS_DLLS ${GMP_LIBRARIES}) +find_library( stdc+++ tmp $ENV{PATH}) +list (APPEND SYS_DLLS ${tmp}) +find_library( winpthread tmp $ENV{PATH}) +list (APPEND SYS_DLLS ${tmp}) +find_library( gcc_s_seh tmp $ENV{PATH}) +list (APPEND SYS_DLLS ${tmp}) + +endif() # inform we are compiling YAP # s used in MSYS @@ -50,7 +54,7 @@ set(SYS_DLLS /mingw64/bin/libgcc_s_seh-1.dll $ ) if (TARGET real) - list( APPEND python_dlls $ + list( python_dlls $ ) endif() @@ -77,7 +81,7 @@ add_custom_target( YAP4PY ALL COMMAND ${PYTHON_EXECUTABLE} setup.py sdist bdist_wheel WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS YAP4PY_SETUP) - + install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install --force --no-index -f dist yap4py