From 2b9857fc59a176c941df197ae4d3e4316b73e1ef Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 11 Dec 2015 19:08:56 +0100 Subject: [PATCH] find gomp and stdc++ libs --- CMakeLists.txt | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c1727f8..ee2b9ad7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,15 +268,14 @@ endif(INSTALL_PROFILES) if(INSTALL_DEPENDENCIES) include (InstallRequiredSystemLibraries) message("***********************************************") - message("${CMAKE_C_STANDARD_LIBRARIES}") - message("${CMAKE_CXX_STANDARD_LIBRARIES}") - message("${CMAKE_C_STANDARD_LIBRARIES_INIT}") - message("${CMAKE_CXX_STANDARD_LIBRARIES_INIT}") - message("${CMAKE_STANDARD_LIBRARIES}") + find_library(LIBGOMP NAMES gomp gomp.1) + find_library(LIBSTDCXX NAMES stdc++.6) + message("gomp: ${LIBGOMP}") + message("stdc++: ${LIBSTDCXX}") get_filename_component(MY_LIB_DIR ${TK_LIBRARY} DIRECTORY) message("my_tcl lib dir: ${MY_LIB_DIR}") install( DIRECTORY "${MY_LIB_DIR}" DESTINATION . COMPONENT netgen ) - install( FILES "${Boost_LIBRARIES}" DESTINATION lib COMPONENT netgen ) + install( FILES "${Boost_LIBRARIES}" ${LIBGOMP} ${LIBSTDCXX} DESTINATION lib COMPONENT netgen ) endif(INSTALL_DEPENDENCIES) ####################################################################### @@ -334,13 +333,7 @@ endif(UNIX) if(APPLE) set(CPACK_GENERATOR "Bundle") set(CPACK_BUNDLE_NAME "NGSuite") - set(CPACK_BUNDLE_PLIST ${mac_plist}) - set(CPACK_BUNDLE_ICON - ${CMAKE_CURRENT_SOURCE_DIR}/../netgen/windows/netgen.ico) -# set(CPACK_BUNDLE_STARTUP_COMMAND /Applications/NGSuite.app/Contents/MacOS/NGSuite) -# set(CPACK_BUNDLE_STARTUP_COMMAND /Applications/NGSuite.app/Contents/Resources/bin/netgen) - set(CPACK_BUNDLE_STARTUP_COMMAND startup.sh) -# set(CPACK_SOURCE_GENERATOR "TGZ") + set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/../netgen/windows/netgen.ico) # create some auxiliary files set(mac_startup ${CMAKE_CURRENT_BINARY_DIR}/startup.sh) @@ -357,7 +350,7 @@ if(APPLE) file(APPEND ${mac_ngsuite} "NGSuite_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/NGSuite//'`\"\n") file(APPEND ${mac_ngsuite} "NGSuite_RESOURCES=\"$NGSuite_BUNDLE/Contents/Resources\"\n") file(APPEND ${mac_ngsuite} "open -a /Applications/Utilities/Terminal.app $NGSuite_RESOURCES/bin/startup.sh\n") - install(PROGRAMS ${mac_ngsuite} DESTINATION bin) + set(CPACK_BUNDLE_STARTUP_COMMAND ${mac_ngsuit}) set(mac_plist ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) file(WRITE ${mac_plist} "\n") @@ -370,6 +363,7 @@ if(APPLE) file(APPEND ${mac_plist} " NGSuite\n") file(APPEND ${mac_plist} "\n") file(APPEND ${mac_plist} "\n") + set(CPACK_BUNDLE_PLIST ${mac_plist}) endif(APPLE) include(CPack)