Skip to content

Commit

Permalink
Improve CMake installation
Browse files Browse the repository at this point in the history
  • Loading branch information
buschmann23 committed Jan 25, 2022
1 parent 21a9431 commit 298b2d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ endif(${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR})

include(GNUInstallDirs)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "libfuoten default install prefix" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)


option(BUILD_SHARED_LIBS "Enable the build of shared libraries" ON)
option(ENABLE_MAINTAINER_FLAGS "Enables some build flags used for development" OFF)
set(HBNSC_APPNAME "" CACHE STRING "Name of the application the HBN SFOS Components are used for. Used for installation values.")
set(HBNSC_LIBDIR ${CMAKE_INSTALL_DATADIR}/${HBNSC_APPNAME}/lib CACHE PATH "Directory to install libraries.")
set(HBNSC_I18NDIR ${CMAKE_INSTALL_DATADIR}/${HBNSC_APPNAME}/translations CACHE PATH "Directory to install translations")
set(HBNSC_ICONSDIR ${CMAKE_INSTALL_DATADIR}/${HBNSC_APPNAME}/icons CACHE PATH "Directory to install icon")
set(HBNSC_QMLDIR ${CMAKE_INSTALL_DATADIR}/${HBNSC_APPNAME} CACHE PATH "Directory to install QML files.")
set(HBNSC_APPNAME ${HARBOUR_APPNAME} CACHE STRING "Name of the application the HBN SFOS Components are used for. Used for installation values.")
set(HBNSC_BASEDIR ${CMAKE_INSTALL_DATADIR}/harbour-nazzida)
set(HBNSC_LIBDIR ${HBNSC_BASEDIR}/lib CACHE PATH "Directory to install libraries.")
set(HBNSC_I18NDIR ${HBNSC_BASEDIR}/translations CACHE PATH "Directory to install translations")
set(HBNSC_ICONSDIR ${HBNSC_BASEDIR}/icons CACHE PATH "Directory to install icon")
set(HBNSC_QMLDIR ${HBNSC_BASEDIR} CACHE PATH "Directory to install QML files.")

option(HBNSC_WITH_OPENSSL "Adds the OpenSSL license information to the licenses model. Requires openssl header files." ON)
option(HBNSC_WITH_NEMONOTIFY "Adds the Nemo Notify lib license information to the licenses model." OFF)
Expand Down
4 changes: 2 additions & 2 deletions translations/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include(HBNSfosGenerateTranslations)

hbn_sfos_gen_translation(hbnsfoscomptrans IDBASED INPUT_FILE hbnsc.ts)
hbn_sfos_gen_translation(hbnsfoscomptrans IDBASED INSTALL_DESTINATION ${HBNSC_I18NDIR} INPUT_FILE hbnsc.ts)

set(_langs da de en_GB en_US es es_419 fr nl sv zh)
foreach(_lang ${_langs})
hbn_sfos_gen_translation(hbnsfoscomptrans IDBASED INPUT_FILE hbnsc_${_lang}.ts)
hbn_sfos_gen_translation(hbnsfoscomptrans IDBASED INSTALL_DESTINATION ${HBNSC_I18NDIR} INPUT_FILE hbnsc_${_lang}.ts)
endforeach()

0 comments on commit 298b2d5

Please sign in to comment.