Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:getchoo
prismlauncher
0001-find-cmark-with-pkgconfig.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-find-cmark-with-pkgconfig.patch of Package prismlauncher
From 5a38fc2c9a329e88c8337af541dfeccaeff1fefb Mon Sep 17 00:00:00 2001 From: seth <getchoo@tuta.io> Date: Sun, 15 Jan 2023 14:47:49 -0500 Subject: [PATCH] find cmark with pkgconfig Signed-off-by: seth <getchoo@tuta.io> --- cmake/Findcmark.cmake | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 cmake/Findcmark.cmake diff --git a/cmake/Findcmark.cmake b/cmake/Findcmark.cmake new file mode 100755 index 00000000..9858e5df --- /dev/null +++ b/cmake/Findcmark.cmake @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: 2019 Black Hat <bhat@encom.eu.org> +# SPDX-License-Identifier: GPL-3.0-only + +# +# CMake module to search for the cmark library +# + +# first try to find cmark-config.cmake +# path to a file not in the search path can be set with 'cmake -Dcmark_DIR=some/path/' +find_package(cmark CONFIG QUIET) +if(cmark_FOUND AND TARGET cmark::cmark) + # found it! + return() +endif() + +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_CMARK QUIET cmark) +endif() + +if(NOT CMARK_INCLUDE_DIR) + find_path(CMARK_INCLUDE_DIR + NAMES cmark.h + PATHS + ${PC_CMARK_INCLUDEDIR} + ${PC_CMARK_INCLUDE_DIRS} + /usr/include + /usr/local/include) +endif() + +if(NOT CMARK_LIBRARY) + find_library(CMARK_LIBRARY + NAMES cmark + HINTS + ${PC_CMARK_LIBDIR} + ${PC_CMARK_LIBRARY_DIRS} + /usr/lib + /usr/local/lib) +endif() + +if(NOT TARGET cmark::cmark) + add_library(cmark::cmark UNKNOWN IMPORTED) + set_target_properties(cmark::cmark + PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + ${CMARK_INCLUDE_DIR}) + set_property(TARGET cmark::cmark APPEND + PROPERTY IMPORTED_LOCATION ${CMARK_LIBRARY}) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(cmark + DEFAULT_MSG + CMARK_INCLUDE_DIR + CMARK_LIBRARY) + +mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR) + +set(CMARK_LIBRARIES ${CMARK_LIBRARY}) +set(CMARK_INCLUDE_DIRS ${CMARK_INCLUDE_DIR}) -- 2.39.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor