From c6d95c90876ed03768092a0385821b7d47135fea Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 11 Nov 2010 15:50:52 +0000 Subject: [PATCH] Remove my DESTDIR hack from the cmake build. It turns out this is built into cmake and works in the same way it does with the gnu autotools. Use it in the standard way with "make DESTDIR=/desired/location install". git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6382 8ced0084-cf51-0410-be5f-012b33b47a6e --- CMakeLists.txt | 12 +++++++----- Source/Core/DolphinWX/CMakeLists.txt | 4 ++-- Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt | 4 ++-- Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt | 4 ++-- Source/Plugins/Plugin_VideoOGL/CMakeLists.txt | 4 ++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3baec3b2c4..f854d68802 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,6 @@ set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH "libdir") set(plugindir ${libdir}/dolphin-emu CACHE PATH "plugindir") set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir") -set(DESTDIR ${DESTDIR} CACHE STRING "Leave blank unless building packages") # Set up paths set(userdir ".dolphin-emu" CACHE STRING "User directory") @@ -341,12 +340,11 @@ add_subdirectory(Source) ######################################## # Install shared data files # -install(DIRECTORY Data/User/ DESTINATION ${DESTDIR}${datadir}/user PATTERN .svn EXCLUDE) -install(DIRECTORY Data/Sys/ DESTINATION ${DESTDIR}${datadir}/sys PATTERN .svn EXCLUDE) -install(FILES Data/license.txt DESTINATION ${DESTDIR}${datadir}) +install(DIRECTORY Data/User/ DESTINATION ${datadir}/user PATTERN .svn EXCLUDE) +install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN .svn EXCLUDE) +install(FILES Data/license.txt DESTINATION ${datadir}) # packaging information -include(CPack) set(CPACK_PACKAGE_NAME "dolphin-emu") set(CPACK_PACKAGE_VENDOR "Dolphin Team") set(CPACK_PACKAGE_VERSION_MAJOR "2") @@ -366,3 +364,7 @@ endif() # TODO: CPACK_PACKAGE_ICON # TODO: CPACK_NSIS_* # TODO: Use CPack components for DSPSpy, etc => cpack_add_component + +# CPack must be included after the CPACK_* variables are set in order for those +# variables to take effect. +include(CPack) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index ea1a0fffe4..56a3bbc501 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -77,9 +77,9 @@ if(wxWidgets_FOUND) add_library(memcard STATIC ${MEMCARDSRCS}) add_executable(${EXEGUI} ${SRCS}) target_link_libraries(${EXEGUI} ${LIBS} ${WXLIBS}) - install(TARGETS ${EXEGUI} RUNTIME DESTINATION ${DESTDIR}${bindir}) + install(TARGETS ${EXEGUI} RUNTIME DESTINATION ${bindir}) else() add_executable(${EXENOGUI} ${SRCS}) target_link_libraries(${EXENOGUI} ${LIBS}) - install(TARGETS ${EXENOGUI} RUNTIME DESTINATION ${DESTDIR}${bindir}) + install(TARGETS ${EXENOGUI} RUNTIME DESTINATION ${bindir}) endif() diff --git a/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt b/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt index d8cda08dbf..5c6e36a0fb 100644 --- a/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt +++ b/Source/Plugins/Plugin_DSP_HLE/CMakeLists.txt @@ -23,5 +23,5 @@ endif(wxWidgets_FOUND) add_library(Plugin_DSP_HLE SHARED ${SRCS}) target_link_libraries(Plugin_DSP_HLE common audiocommon) install(TARGETS Plugin_DSP_HLE - LIBRARY DESTINATION ${DESTDIR}${plugindir} - RUNTIME DESTINATION ${DESTDIR}${plugindir}) + LIBRARY DESTINATION ${plugindir} + RUNTIME DESTINATION ${plugindir}) diff --git a/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt b/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt index 16805d10bb..aa2843020a 100644 --- a/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt +++ b/Source/Plugins/Plugin_DSP_LLE/CMakeLists.txt @@ -21,6 +21,6 @@ endif(wxWidgets_FOUND) add_library(Plugin_DSP_LLE SHARED ${SRCS}) target_link_libraries(Plugin_DSP_LLE ${LIBS}) install(TARGETS Plugin_DSP_LLE - LIBRARY DESTINATION ${DESTDIR}${plugindir} - RUNTIME DESTINATION ${DESTDIR}${plugindir}) + LIBRARY DESTINATION ${plugindir} + RUNTIME DESTINATION ${plugindir}) diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt index 71126a8e06..102be90e66 100644 --- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt +++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt @@ -37,5 +37,5 @@ endif() add_library(Plugin_VideoOGL SHARED ${SRCS}) target_link_libraries(Plugin_VideoOGL ${LIBS}) install(TARGETS Plugin_VideoOGL - LIBRARY DESTINATION ${DESTDIR}${plugindir} - RUNTIME DESTINATION ${DESTDIR}${plugindir}) + LIBRARY DESTINATION ${plugindir} + RUNTIME DESTINATION ${plugindir})