7aeb3bb475
The build-redbear.sh script auto-stashes working tree changes
in nested relibc and base source trees before running the
build. These changes were captured by the failed kernel
build attempt that hit the json-target-spec / kernel rust
toolchain mismatch (fixed in 0.2.5 by creating the local
0.2.5 branch).
Captured changes:
- local/recipes/kde/* : KDE Frameworks 6 source CMakeLists
whitespace changes from the autostash (preserved)
- local/recipes/qt/qtbase/* : qtypes.h whitespace from the
autostash (preserved)
- local/sources/kernel/Cargo.lock : dependency lock from
the kernel relibc rebuild attempt
- local/sources/kernel/src/lib.rs : touched (mtime) by the
build script's touch + make prefix command
This is a bookkeeping commit — the actual code changes
for the threading plan are on the 4 submodule branches
(kernel, relibc, base, libredox) and will be pushed
separately.
0.2.5 branch was created from 0.2.4 (HEAD cd3950072e) to
continue Phase 0 of the multi-threading plan work in a
clean branch.
76 lines
2.2 KiB
CMake
76 lines
2.2 KiB
CMake
#.rst:
|
|
# Findlcms2
|
|
# -------
|
|
#
|
|
# Try to find lcms2 on a Unix system.
|
|
#
|
|
# This will define the following variables:
|
|
#
|
|
# ``lcms2_FOUND``
|
|
# True if (the requested version of) lcms2 is available
|
|
# ``lcms2_VERSION``
|
|
# The version of lcms2
|
|
# ``lcms2_LIBRARIES``
|
|
# This should be passed to target_link_libraries() if the target is not
|
|
# used for linking
|
|
# ``lcms2_INCLUDE_DIRS``
|
|
# This should be passed to target_include_directories() if the target is not
|
|
# used for linking
|
|
# ``lcms2_DEFINITIONS``
|
|
# This should be passed to target_compile_options() if the target is not
|
|
# used for linking
|
|
#
|
|
# If ``lcms2_FOUND`` is TRUE, it will also define the following imported target:
|
|
#
|
|
# ``lcms2::lcms2``
|
|
# The lcms2 library
|
|
#
|
|
# In general we recommend using the imported target, as it is easier to use.
|
|
# Bear in mind, however, that if the target is in the link interface of an
|
|
# exported library, it must be made available by the package config file.
|
|
|
|
# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
find_package(PkgConfig)
|
|
pkg_check_modules(PKG_lcms2 QUIET lcms2)
|
|
|
|
set(lcms2_VERSION ${PKG_lcms2_VERSION})
|
|
set(lcms2_DEFINITIONS ${PKG_lcms2_CFLAGS_OTHER})
|
|
|
|
find_path(lcms2_INCLUDE_DIR
|
|
NAMES lcms2.h
|
|
HINTS ${PKG_lcms2_INCLUDE_DIRS}
|
|
)
|
|
|
|
find_library(lcms2_LIBRARY
|
|
NAMES lcms2
|
|
HINTS ${PKG_lcms2_LIBRARY_DIRS}
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(lcms2
|
|
FOUND_VAR lcms2_FOUND
|
|
REQUIRED_VARS lcms2_LIBRARY
|
|
lcms2_INCLUDE_DIR
|
|
VERSION_VAR lcms2_VERSION
|
|
)
|
|
|
|
if (lcms2_FOUND AND NOT TARGET lcms2::lcms2)
|
|
add_library(lcms2::lcms2 UNKNOWN IMPORTED)
|
|
set_target_properties(lcms2::lcms2 PROPERTIES
|
|
IMPORTED_LOCATION "${lcms2_LIBRARY}"
|
|
INTERFACE_COMPILE_OPTIONS "${lcms2_DEFINITIONS}"
|
|
# Don't use the register keyword to allow compiling in C++17 mode.
|
|
# See https://github.com/mm2/Little-CMS/issues/243
|
|
INTERFACE_COMPILE_DEFINITIONS "CMS_NO_REGISTER_KEYWORD=1"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${lcms2_INCLUDE_DIR}"
|
|
)
|
|
endif()
|
|
|
|
set(lcms2_INCLUDE_DIRS ${lcms2_INCLUDE_DIR})
|
|
set(lcms2_LIBRARIES ${lcms2_LIBRARY})
|
|
|
|
mark_as_advanced(lcms2_INCLUDE_DIR)
|
|
mark_as_advanced(lcms2_LIBRARY)
|