Commit 0f4424ba authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

macosx wheels updates

parent 15446f79
......@@ -55,7 +55,7 @@ MESSAGE( STATUS "BUILD_TYPE =" ${RELEASE} )
FIND_PACKAGE(SQLITE3)
if (APPLE)
set (HDF5_USE_STATIC_LIBRARIES TRUE)
#set (HDF5_USE_STATIC_LIBRARIES TRUE)
endif(APPLE)
FIND_PACKAGE(HDF5 COMPONENTS CXX REQUIRED)
......@@ -69,9 +69,10 @@ MESSAGE( STATUS "2) HDF5_CXX_LIBRARIES=" ${HDF5_CXX_LIBRARIES})
MESSAGE(STATUS "NEMO LIGHT will be build")
add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/nemolight ${PROJECT_SOURCE_DIR}/3rdparty/nemolight/build-${CMAKE_BUILD_TYPE} )
#add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/nemolight ${PROJECT_SOURCE_DIR}/3rdparty/nemolight/build-${CMAKE_BUILD_TYPE} )
add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/nemolight)
set(NEMOLIGHT ${PROJECT_SOURCE_DIR}/3rdparty/nemolight)
set(NEMOLIB ${NEMOLIGHT}/build-${CMAKE_BUILD_TYPE}/lib)
set(NEMOLIB ${PROJECT_BINARY_DIR}/3rdparty/nemolight/lib)
set(NEMOINC ${NEMOLIGHT}/src/inc)
MESSAGE( STATUS "NEMOLIB : " ${NEMOLIB} )
......@@ -97,7 +98,15 @@ STRING(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}
# create library "uns"
add_library (unsio ${LIBTYPE} ${LIBSOURCES})
if (APPLE)
SET_TARGET_PROPERTIES(unsio PROPERTIES MACOSX_RPATH TRUE)
if (NOT NO_RPATH)
MESSAGE(STATUS "RPATH activated for UNSIO library")
SET_TARGET_PROPERTIES(unsio PROPERTIES MACOSX_RPATH TRUE)
else ()
# to deactivate RPATH compile with -DNO_RPATH=1
# it's mandatory to build wheel on MacOSX
MESSAGE(STATUS "RPATH DE-activated for UNSIO library")
endif()
endif (APPLE)
# special flags for MacOSX
......@@ -132,7 +141,9 @@ ENDIF ()#NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
MESSAGE( STATUS "--------> CMAKE_INSTALL_PREFIX =" ${CMAKE_INSTALL_PREFIX})
# following line is important for building python wheel package later from docker ci
if (NOT OSX)
set_target_properties(unsio PROPERTIES LINK_FLAGS "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/${PREFIX_LIB}")
endif()
if (OSX)
#MESSAGE(STATUS "\nAfter running \"make install\", do not forget to set your environment variable DYLD_LIBRARY_PATH using command:\n\n export DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib\n")
......
......@@ -99,8 +99,8 @@ setup(
swig_opts=['-c++','-modern', '-Isrc','-I./py/swig', '-Iswig'],
include_dirs = [numpy_include,'src'],
libraries=['unsio'],
library_dirs=['/usr/lib64','/lib64'],
runtime_library_dirs=['/usr/lib64','/lib64']
library_dirs=['/Users/jcl/local/unsio/lib','/usr/lib64','/lib64'],
runtime_library_dirs=['/Users/jcl/local/unsio/lib','/usr/lib64','/lib64']
#library_dirs=[os.environ['NEMOLIB']],
#runtime_library_dirs=[os.environ['NEMOLIB']]
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment