diff options
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | librabbitmq/CMakeLists.txt | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d594aa0..a0d4281 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ project(rabbitmq-c "C") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) +set(VERSION "0.2") + #find python find_package(PythonInterp REQUIRED) @@ -56,3 +58,14 @@ if (POPT_FOUND) add_subdirectory(tools) endif (POPT_FOUND) +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) + +configure_file(librabbitmq.pc.in ${CMAKE_CURRENT_BINARY_DIR}/librabbitmq.pc @ONLY) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/librabbitmq.pc + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig + ) diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt index a369c0b..4cdc390 100644 --- a/librabbitmq/CMakeLists.txt +++ b/librabbitmq/CMakeLists.txt @@ -33,7 +33,7 @@ add_custom_command( VERBATIM) -SET(CONFIG_CONTENTS "#define VERSION \"0.2\" +SET(CONFIG_CONTENTS "#define VERSION \"${VERSION}\" #ifndef __cplusplus # define inline ${C_INLINE} #endif // __cplusplus |