diff --git a/CMakeLists.txt b/CMakeLists.txt index 799174179..bf5b5d1f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,7 +317,9 @@ if( CMAKE_GENERATOR MATCHES "Visual Studio" ) PROPERTIES VS_STARTUP_PROJECT "${CMAKE_PROJECT_NAME}" ) +endif() +if( CMAKE_SYSTEM_NAME MATCHES "Windows" ) # Build using multiple processors foreach( config ${CMAKE_CONFIGURATION_TYPES} ) string( TOUPPER "${config}" config ) @@ -330,8 +332,7 @@ if( CMAKE_GENERATOR MATCHES "Visual Studio" ) set( CMAKE_INSTALL_UCRT_LIBRARIES NO ) set( CMAKE_INSTALL_MFC_LIBRARIES NO ) set( CMAKE_INSTALL_OPENMP_LIBRARIES NO ) -endif() -if( CMAKE_SYSTEM_NAME MATCHES "Windows" ) + include( InstallRequiredSystemLibraries ) endif() diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt index 94f9e3d49..98689c6a3 100755 --- a/help/CMakeLists.txt +++ b/help/CMakeLists.txt @@ -31,20 +31,18 @@ if (PACKAGE_MANUAL) ) \ ") - if( "${CMAKE_GENERATOR}" MATCHES "Xcode" ) + if( CMAKE_SYSTEM_NAME MATCHES "Darwin" ) install( DIRECTORY "${MANUAL_PATH}/" DESTINATION "${_APPDIR}/help/manual" ) - elseif( "${CMAKE_GENERATOR}" MATCHES "Visual Studio*" ) + elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" ) install( DIRECTORY "${MANUAL_PATH}/" DESTINATION "help/manual" ) endif() endif() -if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" ) - if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*") - install( DIRECTORY "${MANUAL_PATH}" OPTIONAL - DESTINATION "${_DATADIR}/tenacity/help" ) - install( FILES "${_SRCDIR}/tenacity.1" - DESTINATION "${_MANDIR}/man1" ) - install( FILES "${_INTDIR}/${APP_NAME}.metainfo.xml" - DESTINATION "${_DATADIR}/metainfo" ) - endif() +if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + install( DIRECTORY "${MANUAL_PATH}" OPTIONAL + DESTINATION "${_DATADIR}/tenacity/help" ) + install( FILES "${_SRCDIR}/tenacity.1" + DESTINATION "${_MANDIR}/man1" ) + install( FILES "${_INTDIR}/${APP_NAME}.metainfo.xml" + DESTINATION "${_DATADIR}/metainfo" ) endif() diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt index 44728bbf6..45ed01f5f 100755 --- a/images/CMakeLists.txt +++ b/images/CMakeLists.txt @@ -15,15 +15,13 @@ list( APPEND PIXMAPS ${_SRCDIR}/icons/48x48/${APP_NAME}.xpm ) -if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" ) - if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*") - install( FILES "${_SRCDIR}/${APP_NAME}.svg" - DESTINATION "${_DATADIR}/icons/hicolor/scalable/apps" ) - install( DIRECTORY "${_SRCDIR}/icons/" - DESTINATION "${_DATADIR}/icons/hicolor" - FILES_MATCHING PATTERN "*.png" ) - install( FILES ${PIXMAPS} - DESTINATION "${_DATADIR}/pixmaps" ) - endif() +if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + install( FILES "${_SRCDIR}/${APP_NAME}.svg" + DESTINATION "${_DATADIR}/icons/hicolor/scalable/apps" ) + install( DIRECTORY "${_SRCDIR}/icons/" + DESTINATION "${_DATADIR}/icons/hicolor" + FILES_MATCHING PATTERN "*.png" ) + install( FILES ${PIXMAPS} + DESTINATION "${_DATADIR}/pixmaps" ) endif() diff --git a/nyquist/CMakeLists.txt b/nyquist/CMakeLists.txt index 08e97a2c8..3dfc1816b 100755 --- a/nyquist/CMakeLists.txt +++ b/nyquist/CMakeLists.txt @@ -82,10 +82,8 @@ endforeach() add_custom_target( ${TARGET} ALL DEPENDS ${OUTPUTS} SOURCES ${SOURCES} ) -if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" ) - if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*") - install( DIRECTORY "${_DEST}/nyquist" - DESTINATION "${_PKGDATA}" ) - endif() +if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + install( DIRECTORY "${_DEST}/nyquist" + DESTINATION "${_PKGDATA}" ) endif() diff --git a/plug-ins/CMakeLists.txt b/plug-ins/CMakeLists.txt index 0a39a2f0c..40d212d68 100644 --- a/plug-ins/CMakeLists.txt +++ b/plug-ins/CMakeLists.txt @@ -58,10 +58,8 @@ endforeach() add_custom_target( ${TARGET} ALL DEPENDS ${OUTPUTS} SOURCES ${SOURCES} ) -if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" ) - if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*") - install( DIRECTORY "${_DEST}/${TARGET}" - DESTINATION "${_PKGDATA}" ) - endif() +if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + install( DIRECTORY "${_DEST}/${TARGET}" + DESTINATION "${_PKGDATA}" ) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 957859b5b..c026b75d1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1287,7 +1287,7 @@ if( NOT CCACHE_PROGRAM AND NOT SCCACHE_PROGRAM ) endif() endif() -if( "${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio*" ) +if (CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows") install( DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" DESTINATION "."