From 5058d07861f8855fbb4cb17155d823a9da2de327 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Sun, 5 Feb 2017 20:16:27 +0100 Subject: [PATCH 1/2] cmake: Fix resource installation for Linux --- CMakeLists.txt | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 091feb451e..5af2cdffe0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,16 +88,10 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(LIBS) # Set up paths -if(APPLE) - # The gettext module will install the translations unconditionally. - # Redirect the installation to a build directory where it does no harm. - set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install-dummy) -else() - set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") - set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir") - set(mandir ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "mandir") - add_definitions(-DDATA_DIR="${datadir}/") -endif() +set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") +set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir") +set(mandir ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "mandir") +add_definitions(-DDATA_DIR="${datadir}/") if(CMAKE_SYSROOT) # If we should use a sysroot, tell pkg-config to search for packages in there, not on the host @@ -986,10 +980,13 @@ add_subdirectory(Source) ######################################## # Install shared data files # -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|Darwin") +if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows") + install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN) +endif() +if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD|Darwin") install(FILES Data/license.txt DESTINATION ${datadir}) endif() -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD") +if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD") # Install the application icon and menu item install(FILES Data/dolphin-emu.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps) From d096b7b378237c72793ee03e4bdf17940aca2fe0 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Sun, 5 Feb 2017 20:19:30 +0100 Subject: [PATCH 2/2] cmake: Prevent gtest from installing its files --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5af2cdffe0..cd392eb84d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -967,7 +967,7 @@ if(GTEST_FOUND AND USE_SHARED_GTEST) else() message(STATUS "Using static gtest from Externals") include_directories(Externals/gtest/include) - add_subdirectory(Externals/gtest) + add_subdirectory(Externals/gtest EXCLUDE_FROM_ALL) endif() enable_testing()