Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
feat: add find package libdir and lib
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminhang committed Mar 4, 2022
1 parent ea49d6b commit f53d4bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ configure_package_config_file(
${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
NO_CHECK_REQUIRED_COMPONENTS_MACRO
PATH_VARS CMAKE_INSTALL_INCLUDEDIR
PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CIVETWEB_ENABLE_CXX
)

write_basic_package_version_file(${PROJECT_NAME}-config-version.cmake
Expand Down
7 changes: 7 additions & 0 deletions cmake/civetweb-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
include(CMakeFindDependencyMacro)

set_and_check(civetweb_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(civetweb_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(civetweb_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(civetweb_LIBRARIES civetweb)

if(@CIVETWEB_ENABLE_CXX@)
set(civetweb-cpp_LIBRARIES civetweb-cpp)
endif()

find_dependency(Threads)

Expand Down

0 comments on commit f53d4bb

Please sign in to comment.