Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename cmake project from 'check' to 'Check' #232

Merged
merged 3 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 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 @@ -485,13 +485,12 @@ 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
${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config.cmake
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/${EXPORT_NAME}/cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/${EXPORT_NAME}/cmake
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config-version.cmake
Expand All @@ -501,11 +500,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