diff options
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | share/CMakeLists.txt | 18 | ||||
-rw-r--r-- | src/CMakeLists.txt | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b3472c8f..f7c0e0d83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,17 @@ else( APPLE OR MINGW ) set( PROGNAME keepassx ) endif( APPLE OR MINGW ) +if(MINGW) + set(BIN_INSTALL_DIR "") + set(DATA_INSTALL_DIR "share") +elseif(APPLE) + set(BIN_INSTALL_DIR "") + set(DATA_INSTALL_DIR "Contents/Resources") +else(MINGW) + set(BIN_INSTALL_DIR "bin") + set(DATA_INSTALL_DIR "share/keepassx") +endif( MINGW ) + if( WITH_TESTS ) enable_testing() endif( WITH_TESTS ) @@ -82,6 +93,7 @@ endif(NOT ZLIB_SUPPORTS_GZIP) include_directories(${QT_INCLUDE_DIR} ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) add_subdirectory(src) +add_subdirectory(share) add_subdirectory(utils) if( WITH_TESTS ) add_subdirectory(tests) diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt new file mode 100644 index 000000000..7c5853c55 --- /dev/null +++ b/share/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (C) 2011 Felix Geyer <debfx@fobos.de> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 or (at your option) +# version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +file(GLOB DATABASE_ICONS icons/database/*.png) + +install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 21c99d805..10eb8fd83 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -104,3 +104,4 @@ add_library( keepassx_core STATIC ${keepassx_SOURCES} ) add_executable( ${PROGNAME} WIN32 MACOSX_BUNDLE main.cpp ) target_link_libraries( ${PROGNAME} keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${GCRYPT_LIBRARIES} ${ZLIB_LIBRARIES} ) +install(TARGETS ${PROGNAME} DESTINATION ${BIN_INSTALL_DIR}) |