diff options
author | Allen Winter <allen.winter@kdab.com> | 2021-08-14 18:33:19 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2021-08-14 18:33:19 -0400 |
commit | 66da823417cc546140814d7eaf4d467879a91967 (patch) | |
tree | b6af3c949cb6c3bbd4c8cd1b9161d248b65340ed | |
parent | 6f6e85c037fd4f36fd9d96cf114b244e4eac1edc (diff) | |
download | libical-git-66da823417cc546140814d7eaf4d467879a91967.tar.gz |
buildsystem - minor cleanups found with cmake --warn-uninitialized
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 3 | ||||
-rw-r--r-- | src/libical/CMakeLists.txt | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f4546599..5749bdbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,7 @@ if(POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) #Include CMake capabilities include(LibIcalMacrosInternal) @@ -206,8 +206,10 @@ endif() # libicu is highly recommended for RSCALE support # libicu can be found at http://www.icu-project.org # RSCALE info at http://tools.ietf.org/html/rfc7529 -if(NOT "$ENV{ICU_BASE}" STREQUAL "") #support the old ICU_BASE env - set(ICU_ROOT $ENV{ICU_BASE}) +if(DEFINED ICU_BASE) #to make --warn-uninitialized happy + if(NOT "$ENV{ICU_BASE}" STREQUAL "") #support the old ICU_BASE env + set(ICU_ROOT $ENV{ICU_BASE}) + endif() endif() find_package(ICU COMPONENTS uc i18n) set_package_properties(ICU PROPERTIES @@ -279,6 +281,7 @@ endif() # Use GNUInstallDirs include(GNUInstallDirs) +set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR} CACHE STRING "User exectuables directory name" FORCE) set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING "Library directory name" FORCE) set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE STRING "Include directory name" FORCE) set(SHARE_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR} CACHE STRING "Share directory name") diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index bba33fa9..545877ae 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -61,6 +61,9 @@ if(MSVC_VERSION GREATER 1899) set(HAVE_SNPRINTF true) endif() +if(NOT DEFINED CMAKE_REQUIRED_LIBRARIES) + set(CMAKE_REQUIRED_LIBRARIES "") +endif() set(_SAVE_RQL ${CMAKE_REQUIRED_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES kernel32.lib) check_function_exists(GetNumberFormat HAVE_GETNUMBERFORMAT) #Windows <windows.h> diff --git a/src/libical/CMakeLists.txt b/src/libical/CMakeLists.txt index 82c23d01..9c7266b4 100644 --- a/src/libical/CMakeLists.txt +++ b/src/libical/CMakeLists.txt @@ -162,8 +162,6 @@ add_custom_target( if(HAVE_INTROSPECTION) include(GObjectIntrospectionMacros) set(GObjectIntrospection_GIRS) - #set(GObjectIntrospection_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}") - #set(GObjectIntrospection_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}") set(LIBICAL_GIR_VERSION_STRING "${LIBICAL_LIB_MAJOR_VERSION}.0") set(LIB_VERSION "${LIBICAL_LIB_MAJOR_VERSION}_0") @@ -178,7 +176,7 @@ if(HAVE_INTROSPECTION) ) set(ICal_${LIB_VERSION}_gir_LIBRARY "ical") set(ICal_${LIB_VERSION}_gir_INCLUDES GObject-2.0) - set(_includes ${_includes} "-L${LIBRARY_OUTPUT_PATH}") + set(_includes "-L${LIBRARY_OUTPUT_PATH}") set(ICal_${LIB_VERSION}_gir_CFLAGS ${_includes}) set(ICal_${LIB_VERSION}_gir_LIBS ical) |