Browse Source

Update chck.

master
Jari Vetoniemi 9 years ago
parent
commit
7bb81ea426
3 changed files with 67 additions and 2 deletions
  1. +65
    -0
      CMake/FindChck.cmake
  2. +1
    -1
      lib/CMakeLists.txt
  3. +1
    -1
      lib/chck

+ 65
- 0
CMake/FindChck.cmake View File

@ -0,0 +1,65 @@
#.rst:
# FindChck
# -------
#
# Find chck library
#
# Try to find chck library. The following values are defined
#
# ::
#
# CHCK_FOUND - True if chck is available
# CHCK_INCLUDE_DIRS - Include directories for chck
# CHCK_LIBRARIES - List of libraries for chck
# CHCK_DEFINITIONS - List of definitions for chck
#
#=============================================================================
# Copyright (c) 2015 Jari Vetoniemi
#
# Distributed under the OSI-approved BSD License (the "License");
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
unset(CHCK_INCLUDE_DIRS CACHE)
unset(CHCK_LIBRARIES CACHE)
include(FeatureSummary)
set_package_properties(chck PROPERTIES
URL "https://github.com/Cloudef/chck/"
DESCRIPTION "Collection of C utilities (Shared linking not recommended)")
find_package(PkgConfig)
pkg_check_modules(PC_CHCK QUIET chck)
find_path(CHCK_INCLUDE_DIRS NAMES chck/macros.h HINTS ${PC_CHCK_INCLUDE_DIRS})
set(libraries
chck-atlas
chck-buffer
chck-dl
chck-fs
chck-lut
chck-pool
chck-sjis
chck-string
chck-tqueue
chck-unicode
chck-xdg)
unset(libs)
foreach(lib ${libraries})
find_library(CHCK_LIBRARIES_${lib} NAMES ${lib} HINTS ${PC_CHCK_LIBRARY_DIRS})
list(APPEND libs ${CHCK_LIBRARIES_${lib}})
mark_as_advanced(CHCK_LIBRARIES_${lib})
unset(CHCK_LIBRARIES_${lib} CACHE)
endforeach (lib ${libraries})
set(CHCK_LIBRARIES ${libs} CACHE FILEPATH "Path to chck libraries" FORCE)
set(CHCK_DEFINITIONS ${PC_CHCK_CFLAGS_OTHER})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(chck DEFAULT_MSG CHCK_LIBRARIES CHCK_INCLUDE_DIRS)
mark_as_advanced(CHCK_LIBRARIES CHCK_INCLUDE_DIRS CHCK_DEFINITIONS)
unset(libs)

+ 1
- 1
lib/CMakeLists.txt View File

@ -1,3 +1,3 @@
set(CHCK_BUILD_STATIC ON CACHE STRING "Build chck statically if not found systemwide" FORCE)
set(CHCK_BUILD_TESTS OFF CACHE STRING "Do not build chck tests" FORCE)
add_subproject(chck)
add_subproject(chck Chck)

+ 1
- 1
lib/chck

@ -1 +1 @@
Subproject commit 4cb96dd7ab2559196c48f78402a74b4524001e90
Subproject commit 7fd2a7375492c0704286f7073fa22dbfe2218653

Loading…
Cancel
Save