diff options
author | Allen Winter <allen.winter@kdab.com> | 2021-11-27 09:23:17 -0500 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2021-11-27 09:23:17 -0500 |
commit | 9cbfe94975e423a519af550b559ade35f28c4b02 (patch) | |
tree | 6ceed46459b079ca5c2342089d3952ce620d6c76 | |
parent | 7822c0e5f5fd1ef702d5159977badea56ae8e20c (diff) | |
parent | ca908f9971992dbc244381962a101238bd5dcead (diff) | |
download | libical-git-9cbfe94975e423a519af550b559ade35f28c4b02.tar.gz |
Merge branch '3.0'
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | ReleaseNotes.txt | 1 | ||||
-rw-r--r-- | cmake/modules/GtkDoc.cmake | 6 | ||||
-rw-r--r-- | doc/reference/libical-glib/CMakeLists.txt | 17 | ||||
-rwxr-xr-x | scripts/buildtests.sh | 9 | ||||
-rw-r--r-- | src/libical-glib/CMakeLists.txt | 10 |
6 files changed, 38 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b06ea91..5fba305e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ # # -DSTATIC_ONLY=[true|false] # Set to build static libraries only. -# Turns-off GObject Introspection. +# Not available for GObject Introspection and Vala "vapi" # Default=false (build shared and static libs) # # -DSHARED_ONLY=[true|false] @@ -390,6 +390,14 @@ endif() libical_option(ICAL_GLIB_VAPI "Build Vala \"vapi\" files." False) if(ICAL_GLIB_VAPI) + if(STATIC_ONLY) + message(FATAL_ERROR + "You are attempting to build the Vala api, however that option is not supported " + "when building static libraries only. " + "Please disable the static only option (-DSTATIC_ONLY=False) " + "if you really want to build the Vala api. Alternatively, " + "you can disable this feature (by passing -DICAL_GLIB_VAPI=False to cmake).") + endif() if(NOT GOBJECT_INTROSPECTION) message(FATAL_ERROR "You requested to build the Vala vapi but have not enabled the GObject Introspection. " diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 203a5d1d..66789035 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -45,6 +45,7 @@ Version 3.0.12 (UNRELEASED): * Improved FindICU (copied from official CMake. see files in cmake/Kitware) * METHOD:DECLINECOUNTER must have DTEND or DURATION * Handle if DTEND and DURATION are both missing + * Buildsystem fixes (especially for the Ninja generator) Version 3.0.11 (09 October 2021): --------------------------------- diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake index 6090cb85..2cf76aaa 100644 --- a/cmake/modules/GtkDoc.cmake +++ b/cmake/modules/GtkDoc.cmake @@ -18,12 +18,6 @@ # It also adds custom target gtkdoc-rebuild-${_module}-sgml to rebuild the sgml.in # file based on the current sources. -libical_option(ENABLE_GTK_DOC "Use gtk-doc to build documentation" True) - -if(NOT ENABLE_GTK_DOC) - return() -endif() - find_program(GTKDOC_SCAN gtkdoc-scan) find_program(GTKDOC_SCANGOBJ gtkdoc-scangobj) find_program(GTKDOC_MKDB gtkdoc-mkdb) diff --git a/doc/reference/libical-glib/CMakeLists.txt b/doc/reference/libical-glib/CMakeLists.txt index ca58244c..c4f8b594 100644 --- a/doc/reference/libical-glib/CMakeLists.txt +++ b/doc/reference/libical-glib/CMakeLists.txt @@ -1,4 +1,18 @@ -include(GtkDoc) + +option(ENABLE_GTK_DOC "Use gtk-doc to build documentation" True) + +if(NOT ENABLE_GTK_DOC) + return() +endif() + +if(STATIC_ONLY) + message(FATAL_ERROR + "You are attempting to build the Gtk docs, " + "however that option is not supported when building static libraries only. " + "Please disable the static only option (-DSTATIC_ONLY=False) " + "if you really want to build the Gtk docs. Alternatively, you can " + "disable building Gtk docs (by passing -DENABLE_GTK_DOC=False to cmake).") +endif() # To regenerate libical-glib-docs.xml.in from current sources use these steps: # a) delete ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-docs.xml @@ -15,6 +29,7 @@ include(GtkDoc) # like the replacement of the "[Insert title here]" and the <bookinfo/> content if(ENABLE_GTK_DOC) + include(GtkDoc) set(SOURCEDIRS ${CMAKE_BINARY_DIR}/src/libical-glib diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh index 7e8d2439..146cabd2 100755 --- a/scripts/buildtests.sh +++ b/scripts/buildtests.sh @@ -608,8 +608,13 @@ GCC_BUILD testgcc2builtin "$TZCMAKEOPTS" #Ninja build tests NINJA_GCC_BUILD testninjagcc1 "" -NINJA_GCC_BUILD testninjagcc2 "-DSHARED_ONLY=True" -NINJA_GCC_BUILD testninjagcc3 "-DSTATIC_ONLY=True -DICAL_GLIB=False" +NINJA_GCC_BUILD testninjagcc2 "-DICAL_GLIB=True" +NINJA_GCC_BUILD testninjagcc3 "-DICAL_GLIB=True -DICAL_GLIB_VAPI=ON -DGOBJECT_INTROSPECTION=True" +NINJA_GCC_BUILD testninjagcc4 "-DSHARED_ONLY=True -DICAL_GLIB=False" +NINJA_GCC_BUILD testninjagcc5 "-DSHARED_ONLY=True -DICAL_GLIB=True" +NINJA_GCC_BUILD testninjagcc6 "-DSTATIC_ONLY=True -DICAL_GLIB=False" +NINJA_GCC_BUILD testninjagcc7 "-DSTATIC_ONLY=True -DICAL_GLIB=True -DENABLE_GTK_DOC=False" +NINJA_GCC_BUILD testninjagcc9 "-DSHARED_ONLY=True -DICAL_GLIB=True -DGOBJECT_INTROSPECTION=True -DICAL_GLIB_VAPI=ON" CLANG_BUILD testclang1 "" CLANG_BUILD testclang2 "$CMAKEOPTS" diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt index f734024e..de5e6210 100644 --- a/src/libical-glib/CMakeLists.txt +++ b/src/libical-glib/CMakeLists.txt @@ -121,7 +121,7 @@ add_dependencies(ical-glib ical-header) target_compile_options(ical-glib PRIVATE ${GLIB_CFLAGS}) target_compile_definitions(ical-glib PRIVATE -DG_LOG_DOMAIN="libical-glib" -DLIBICAL_GLIB_COMPILATION) target_link_libraries(ical-glib PRIVATE ical ${GLIB_LIBRARIES}) -if(NOT SHARED_ONLY) +if(NOT SHARED_ONLY AND NOT STATIC_ONLY) add_library(ical-glib-static STATIC ${LIBICAL_GLIB_SOURCES}) add_dependencies(ical-glib-static ical-header) target_compile_options(ical-glib-static PUBLIC ${GLIB_CFLAGS} -DG_LOG_DOMAIN="libical-glib" -DLIBICAL_GLIB_COMPILATION) @@ -217,11 +217,11 @@ endif() if(MSVC) set_target_properties(ical-glib PROPERTIES PREFIX "lib") - if(NOT SHARED_ONLY) + if(NOT SHARED_ONLY AND NOT STATIC_ONLY) set_target_properties(ical-glib-static PROPERTIES PREFIX "lib") endif() else() - if(NOT SHARED_ONLY) + if(NOT SHARED_ONLY AND NOT STATIC_ONLY) set_target_properties(ical-glib-static PROPERTIES OUTPUT_NAME "ical-glib") endif() endif() @@ -230,7 +230,7 @@ set_target_properties(ical-glib PROPERTIES SOVERSION ${LIBICAL_LIB_MAJOR_VERSION} ) set_target_properties(ical-glib PROPERTIES CLEAN_DIRECT_OUTPUT 1) -if(NOT SHARED_ONLY) +if(NOT SHARED_ONLY AND NOT STATIC_ONLY) set_target_properties(ical-glib-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) endif() @@ -239,7 +239,7 @@ install( EXPORT icalTargets DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS} ) -if(NOT SHARED_ONLY) +if(NOT SHARED_ONLY AND NOT STATIC_ONLY) install( TARGETS ical-glib-static EXPORT icalTargets |