diff --git a/CMakeLists.txt b/CMakeLists.txt index d0a06a3a..646d52eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,11 +248,6 @@ endif(INSTALL_PROFILES) ####################################################################### if(INSTALL_DEPENDENCIES) include (InstallRequiredSystemLibraries) -# find_library(LIBGOMP NAMES gomp.1) -# find_library(LIBSTDCXX NAMES stdc++.6) -# find_library(LIBGCCS NAMES gcc_s.1) -# install( FILES "${Boost_LIBRARIES}" ${LIBGOMP} ${LIBSTDCXX} ${LIBGCCS} DESTINATION ${ng_install_dir_lib} COMPONENT netgen ) -# install( FILES "${Boost_LIBRARIES}" DESTINATION ${ng_install_dir_lib} COMPONENT netgen ) get_filename_component(MY_LIB_DIR ${TK_LIBRARY} DIRECTORY) if(APPLE) if(TIX_LIBRARY) diff --git a/cmake_modules/SuperBuild.cmake b/cmake_modules/SuperBuild.cmake index 45f18a1d..c3d2ffce 100644 --- a/cmake_modules/SuperBuild.cmake +++ b/cmake_modules/SuperBuild.cmake @@ -51,6 +51,22 @@ if(APPLE) else(APPLE) set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "Prefix prepended to install directories" FORCE) endif(APPLE) +if(UNIX) + # check for write permissions in install directory + execute_process(COMMAND test -w ${INSTALL_DIR} RESULT_VARIABLE res) + IF(res) + message("No write permissions on install directory ${INSTALL_DIR}") + message("The setup routine will now set write permissions by executing following commands, please provide your password when asked for:") + message("sudo mkdir -p ${INSTALL_DIR}") + message("sudo chown -r $ENV{USER}:$ENV{USER} ${INSTALL_DIR}") + execute_process(COMMAND sudo mkdir -p ${INSTALL_DIR}) + execute_process(COMMAND sudo chown -R $ENV{USER}:$ENV{USER} ${INSTALL_DIR}) + endif() + execute_process(COMMAND test -w ${INSTALL_DIR} RESULT_VARIABLE res) + if(res) + message(WARNING "still no write access at install directory, please set permissions manually") + endif() +endif(UNIX) if(NOT WIN32) find_package(ZLIB REQUIRED)