Skip to content

Commit

Permalink
Rename CMake project from 'check' to 'Check'
Browse files Browse the repository at this point in the history
Check should be written with a capital letter.
In a CMake script this makes a difference as
`find_package(Check)` should work, not `find_package(check)`.

This change does not alter how Check is installed.
Maintaining compatibility with GNU Autotools installation
is mandatory.

Signed-off-by: Mikko Johannes Koivunalho <[email protected]>
  • Loading branch information
mikkoi committed Oct 25, 2019
1 parent 5c6ba01 commit f65a5c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(POLICY CMP0076)
# target_sources() leaves relative source file paths unmodified. (OLD)
cmake_policy(SET CMP0076 OLD)
endif()
project(check
project(Check
DESCRIPTION "Unit Testing Framework for C"
LANGUAGES C)

Expand Down Expand Up @@ -486,7 +486,7 @@ endif (BUILD_TESTING)
###############################################################################
# Export project, prepare a config and config-version files
set(LIB_INSTALL_DIR lib CACHE FILEPATH "lib INSTALL DIR")
set(EXPORT_NAME ${PROJECT_NAME})
string(TOLOWER ${PROJECT_NAME} EXPORT_NAME)
include(CMakePackageConfigHelpers)
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EXPORT_NAME}-config.cmake.in
Expand All @@ -501,11 +501,11 @@ write_basic_package_version_file(

export(EXPORT check-targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-targets.cmake"
NAMESPACE Check::
NAMESPACE "${PROJECT_NAME}::"
)

install(EXPORT check-targets
NAMESPACE Check::
NAMESPACE "${PROJECT_NAME}::"
FILE "${EXPORT_NAME}-targets.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME}
)
Expand Down
4 changes: 2 additions & 2 deletions doc/example/cmake/FindCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
INCLUDE( FindPkgConfig )

# Take care about check.pc settings
PKG_SEARCH_MODULE( CHECK check )
PKG_SEARCH_MODULE( CHECK Check )

# Look for CHECK include dir and libraries
IF( NOT CHECK_FOUND )
IF ( CHECK_INSTALL_DIR )
MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find Check" )
SET ( CHECK_INCLUDE_DIR "${CHECK_INSTALL_DIR}/include" )
SET ( CHECK_INCLUDE_DIRS "${CHECK_INCLUDE_DIR}" )
FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
Expand Down

0 comments on commit f65a5c4

Please sign in to comment.