File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.9.2)
22project (CppKafka)
3-
4- #Allows using '<Package>_ROOT' to point to a package install dir. After CMake v3.14 this becomes default behavior.
5- #cmake_policy(SET CMP0074 NEW)
3+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0" )
4+ # Use <package>_ROOT variable to find configuration files
5+ cmake_policy (SET CMP0074 NEW)
6+ endif ()
67
78include (GNUInstallDirs)
89include (CMakePackageConfigHelpers)
@@ -47,6 +48,10 @@ option(CPPKAFKA_RDKAFKA_STATIC_LIB "Link with Rdkafka static library." OFF)
4748# Add FindRdKafka.cmake
4849set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /cmake/" )
4950
51+ if (NOT CPPKAFKA_CONFIG_DIR)
52+ set (CPPKAFKA_CONFIG_DIR lib/cmake/${PROJECT_NAME} )
53+ endif ()
54+
5055# Maintain previous compatibility
5156if (RDKAFKA_ROOT_DIR)
5257 set (RdKafka_ROOT ${RDKAFKA_ROOT_DIR} )
You can’t perform that action at this time.
0 commit comments