]> granicus.if.org Git - libevent/commitdiff
Some work on making it possible to simply do add_subdirectory() on the project.
authorJoakim Soderberg <joakim.soderberg@gmail.com>
Tue, 14 Jan 2014 13:01:31 +0000 (13:01 +0000)
committerJoakim Soderberg <joakim.soderberg@gmail.com>
Tue, 14 Jan 2014 13:01:31 +0000 (13:01 +0000)
CMakeLists.txt
cmake/CheckPrototypeDefinition.cmake

index fbe2e2ba659c9e8905644f2009dbdb9a3b499b69..f0c174838503db11577dd46b0ccfece80443c23c 100644 (file)
@@ -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")
index 3a53f668003199df61097878b2273d806294ed31..5e6ba4bb1ab4babafd1e89adc98985e290fed15e 100644 (file)
@@ -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)