Commit a2ce0601 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

better macosx support

parent e00d8a09
......@@ -131,7 +131,8 @@ ENDIF ()#NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
MESSAGE( STATUS "--------> CMAKE_INSTALL_PREFIX =" ${CMAKE_INSTALL_PREFIX})
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")
#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")
MESSAGE(STATUS "\nBetter run cmake on macosx using clang compiler with commnand:\nCC=/usr/bin/cc CXX=/usr/bin/c++ cmake ..\n")
endif(OSX)
# use, i.e. don't skip the full RPATH for the build tree
......@@ -183,11 +184,8 @@ FOREACH(exe_cpp ${execpp_sources})
add_executable (${exe} ${exe_cpp})
if (APPLE)
SET_TARGET_PROPERTIES(${exe} PROPERTIES MACOSX_RPATH TRUE)
#SET_TARGET_PROPERTIES(${exe} PROPERTIES CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#SET_TARGET_PROPERTIES(${exe} PROPERTIES CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
SET_TARGET_PROPERTIES(${exe} PROPERTIES CMAKE_INSTALL_NAME_DIR "@rpath")
#SET_TARGET_PROPERTIES(${exe} PROPERTIES CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
#message ( status "MACOSX rpath handling...." ${CMAKE_INSTALL_PREFIX}/lib)
#SET_TARGET_PROPERTIES(${exe} PROPERTIES INSTALL_RPATH "@rpath/../lib")
endif(APPLE)
# Link the executable to the Hello library.
target_link_libraries (${exe} unsio ) # ${FC_GFORT_LIB} ${FC_G77_LIB} stdc++)
......
......@@ -3,18 +3,23 @@
"""
To build RPM :
==============
python3 setup.py bdist_rpm --release 1mga6
To build deb package
To build deb package :
======================
python3 setup.py --command-packages=stdeb.command bdist_deb sdist_dsc --with-python2=True --with-python3=True --dist-dir=my_deb --debian-version 0ubuntu16.04
To build MacOSX
1) use clang compiler
export CXX=/usr/bin/c++
To build MacOSX :
=================
1) use clang compiler and python3
2) build
python setup.py build_ext -L ${HOME}/local/unsio/lib -R ${HOME}/local/unsio/lib
CC=/usr/bin/cc CXX=/usr/bin/c++ python3 setup.py build_ext -L ${HOME}/local/unsio/lib -R ${HOME}/local/unsio/lib
3) install locally
python setup.py install --user
python3 setup.py install --user
4) set DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=${HOME}/local/unsio/lib
"""
......
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