Commit 2dc36510 authored by jclamber's avatar jclamber

fix macosx install issue

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@173 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent b636bbad
......@@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
# some status
MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
MESSAGE( STATUS "PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR} )
MESSAGE( STATUS "CMAKE_BUILD_TYPE =" ${CMAKE_BUILD_TYPE} )
MESSAGE( STATUS "CMAKE_CXX_FLAGS =" ${CMAKE_CXX_FLAGS} )
MESSAGE( STATUS "LIBRARY TYPE =" ${LIBTYPE} )
......@@ -63,29 +64,31 @@ SET(CMAKE_SWIG_FLAGS "-c++")
SET_SOURCE_FILES_PROPERTIES(${INTERFACE} PROPERTIES CPLUSPLUS ON)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/swig)
set(CMAKE_SWIG_OUTDIR ${PROJECT_BINARY_DIR}/swig)
SWIG_ADD_MODULE(${MODULENAME} python ${INTERFACE} ${execpp_sources} ${UNSIOPATH}/lib/libunsio.so ${UNSIOPATH}/lib/libnemo.so )
IF (OSX) # Mac OSX
SET(SOEXT "dylib")
ELSE (OSX) # Linux
SET(SOEXT "so")
ENDIF(OSX)
SWIG_ADD_MODULE(${MODULENAME} python ${INTERFACE} ${execpp_sources} ${UNSIOPATH}/lib/libunsio.${SOEXT} ${UNSIOPATH}/lib/libnemo.${SOEXT} )
SWIG_LINK_LIBRARIES(${MODULENAME} ${PYTHON_LIBRARIES} ${UNSIOPATH}/lib/libunsio.so ${UNSIOPATH}/lib/libnemo.so ${SQLITE3_LIB_PATH}/libsqlite3.so )
SWIG_LINK_LIBRARIES(${MODULENAME} ${PYTHON_LIBRARIES} ${UNSIOPATH}/lib/libunsio.${SOEXT} ${UNSIOPATH}/lib/libnemo.${SOEXT} ${SQLITE3_LIB_PATH}/libsqlite3.${SOEXT} )
# ----------------------------------------------------------
# Install SETUP
# ----------------------------------------------------------
mark_as_advanced(CMAKE_INSTALL_PREFIX)
IF (OSX) # Mac OSX
SET(SOEXT "dylib")
ELSE (OSX) # Linux
SET(SOEXT "so")
ENDIF(OSX)
set (CMAKE_INSTALL_PREFIX ${UNSIOPATH})
MESSAGE( STATUS "--------> CMAKE_INSTALL_PREFIX =" ${CMAKE_INSTALL_PREFIX})
INSTALL(FILES ${PROJECT_BINARY_DIR}/_${MODULENAME}.${SOEXT} DESTINATION py/modules)
INSTALL(FILES ${PROJECT_BINARY_DIR}/_${MODULENAME}.so DESTINATION py/modules)
INSTALL(FILES ${PROJECT_BINARY_DIR}/swig/${MODULENAME}.py DESTINATION py/modules)
#
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