Skip to content
Snippets Groups Projects
Commit 7f7449af authored by Marina Ganeva's avatar Marina Ganeva
Browse files

Minor changes to cmake files to fix the build with macports.

parent e422f1aa
No related branches found
No related tags found
No related merge requests found
...@@ -131,20 +131,30 @@ else() ...@@ -131,20 +131,30 @@ else()
set ( CMAKE_OSX_ARCHITECTURES x86_64 ) set ( CMAKE_OSX_ARCHITECTURES x86_64 )
set ( CMAKE_OSX_DEPLOYMENT_TARGET 10.8 ) set ( CMAKE_OSX_DEPLOYMENT_TARGET 10.8 )
# Follow symlinks so cmake copies the file # Follow symlinks so cmake copies the file
set ( PYQT4_PATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 ) # PYQT4_PATH, SITEPACKAGES_PATH, OPENSSL_ROOT_DIR may be defined externally (cmake -D)
# it would be good do not overwrite them (important for the compilation with macports)
if (NOT PYQT4_PATH)
set ( PYQT4_PATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
endif(NOT PYQT4_PATH)
execute_process(COMMAND readlink ${PYQT4_PATH}/Qt.so OUTPUT_VARIABLE PYQT4_SYMLINK_Qtso) execute_process(COMMAND readlink ${PYQT4_PATH}/Qt.so OUTPUT_VARIABLE PYQT4_SYMLINK_Qtso)
string(FIND ${PYQT4_SYMLINK_Qtso} "Qt.so" STOPPOS) string(FIND "${PYQT4_SYMLINK_Qtso}" "Qt.so" STOPPOS)
string(SUBSTRING ${PYQT4_SYMLINK_Qtso} 0 ${STOPPOS} PYQT4_SYMLINK) string(SUBSTRING "${PYQT4_SYMLINK_Qtso}" 0 ${STOPPOS} PYQT4_SYMLINK)
set ( PYQT4_PYTHONPATH ${PYQT4_PATH}/${PYQT4_SYMLINK} ) set ( PYQT4_PYTHONPATH ${PYQT4_PATH}/${PYQT4_SYMLINK} )
string(REGEX REPLACE "/$" "" PYQT4_PYTHONPATH "${PYQT4_PYTHONPATH}")
set ( SITEPACKAGES_PATH /usr/local/lib/python${PY_VER}/site-packages ) if (NOT SITEPACKAGES_PATH)
set ( SITEPACKAGES_PATH /usr/local/lib/python${PY_VER}/site-packages )
endif(NOT SITEPACKAGES_PATH)
execute_process(COMMAND readlink ${SITEPACKAGES_PATH}/sip.so OUTPUT_VARIABLE SITEPACKAGES_SYMLINK_sipso) execute_process(COMMAND readlink ${SITEPACKAGES_PATH}/sip.so OUTPUT_VARIABLE SITEPACKAGES_SYMLINK_sipso)
string(FIND ${SITEPACKAGES_SYMLINK_sipso} "sip.so" STOPPOS) string(FIND "${SITEPACKAGES_SYMLINK_sipso}" "sip.so" STOPPOS)
string(SUBSTRING ${SITEPACKAGES_SYMLINK_sipso} 0 ${STOPPOS} SITEPACKAGES_SYMLINK) string(SUBSTRING "${SITEPACKAGES_SYMLINK_sipso}" 0 ${STOPPOS} SITEPACKAGES_SYMLINK)
set ( SITEPACKAGES ${SITEPACKAGES_PATH}/${SITEPACKAGES_SYMLINK} ) set ( SITEPACKAGES ${SITEPACKAGES_PATH}/${SITEPACKAGES_SYMLINK} )
string(REGEX REPLACE "/$" "" SITEPACKAGES "${SITEPACKAGES}")
# use homebrew OpenSSL package # use homebrew OpenSSL package
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl ) if (NOT OPENSSL_ROOT_DIR)
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl )
endif(NOT OPENSSL_ROOT_DIR)
endif() endif()
# Python packages # Python packages
......
...@@ -1037,8 +1037,11 @@ foreach(PY_FILE ${IPY_FILES} ) ...@@ -1037,8 +1037,11 @@ foreach(PY_FILE ${IPY_FILES} )
endforeach() endforeach()
install ( FILES ${CONFIG_RESET_SCRIPT} DESTINATION ${BIN_DIR} ) install ( FILES ${CONFIG_RESET_SCRIPT} DESTINATION ${BIN_DIR} )
# file make_package.rb contains hard-coded path to the libraries
# this causes fail of the installation with macports
# therefore MACPORTS option is introduced
if ( APPLE ) if ( APPLE )
if (OSX_VERSION VERSION_LESS 10.9) if (OSX_VERSION VERSION_LESS 10.9 OR MACPORTS)
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake
@ONLY ) @ONLY )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment