From: Joakim Soderberg Date: Tue, 14 Jan 2014 13:01:31 +0000 (+0000) Subject: Some work on making it possible to simply do add_subdirectory() on the project. X-Git-Tag: release-2.1.4-alpha~42^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49ab36327177bf593e3b9e62caf058de0d27c385;p=libevent Some work on making it possible to simply do add_subdirectory() on the project. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fbe2e2ba..f0c17483 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -989,6 +989,7 @@ export(PACKAGE libevent) set(EVENT__INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") +set(LIBEVENT_INCLUDE_DIRS ${EVENT__INCLUDE_DIRS} CACHE PATH "Libevent include directories") configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfig.cmake.in ${PROJECT_BINARY_DIR}/LibeventConfig.cmake @ONLY) @@ -1004,7 +1005,7 @@ file(RELATIVE_PATH # so that the include dirs are givenrelative to where the # config file is located. set(EVENT__INCLUDE_DIRS - "\${EVENT_CMAKE_DIR}/${REL_INCLUDE_DIR}") + "\${EVENT_CMAKE_DIR}/${REL_INCLUDE_DIR}") configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfig.cmake.in ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LibeventConfig.cmake @ONLY) @@ -1037,3 +1038,5 @@ install(FILES # Install exports for the install-tree. install(EXPORT LibeventTargets DESTINATION "${EVENT_INSTALL_CMAKE_DIR}" COMPONENT dev) + +set(LIBEVENT_LIBRARIES event event_core event_extras CACHE STRING "Libevent libraries") diff --git a/cmake/CheckPrototypeDefinition.cmake b/cmake/CheckPrototypeDefinition.cmake index 3a53f668..5e6ba4bb 100644 --- a/cmake/CheckPrototypeDefinition.cmake +++ b/cmake/CheckPrototypeDefinition.cmake @@ -52,8 +52,7 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE}) set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN}) - #configure_file("${CMAKE_ROOT}/Modules/CheckPrototypeDefinition.c.in" - # "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY) + # TODO: Fix this. If the Module path has more than one entry, the below will fail. configure_file("${CMAKE_MODULE_PATH}/CheckPrototypeDefinition.c.in" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)