Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMake/Modules/RPLYConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The RPLY library directory.
SET(RPLY_LIBRARY_DIR "@LIB_INSTALL_DIR@")
SET(RPLY_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@")
SET(RPLY_LIBRARY "@RPLY_LIBRARY@")
26 changes: 26 additions & 0 deletions CMake/export/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This CMakeLists.txt file handles the creation of files needed by
# other client projects that use RPLY. Nothing is built by this
# CMakeLists.txt file. This CMakeLists.txt file must be processed by
# CMake after all the other CMakeLists.txt files in the RPLY tree,
# which is why the SUBDIRS(CMake/export) command is at the end
# of the top level CMakeLists.txt file.

# Save the compiler settings so another project can import them.
INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
SET(RPLY_BUILD_SETTINGS_FILE ${rply_BINARY_DIR}/RPLYBuildSettings.cmake)
SET(RPLY_EXPORT_BUILD_SETTINGS_FILE
${CMAKE_INSTALL_PREFIX}/share/rply/cmake/RPLYBuildSettings.cmake
)
CMAKE_EXPORT_BUILD_SETTINGS(${RPLY_BUILD_SETTINGS_FILE})

# Create the VXLConfig.cmake file for the build tree.
CONFIGURE_FILE(${RPLY_CMAKE_DIR}Modules/RPLYConfig.cmake.in
${CMAKE_BINARY_DIR}/rplyConfig.cmake @ONLY IMMEDIATE)

INSTALL_FILES(/share/rply FILES
${CMAKE_BINARY_DIR}/rplyConfig.cmake
# ${RPLY_BINARY_DIR}/RPLYBuildSettings.cmake
# ${RPLY_BINARY_DIR}/RPLYLibraryDepends.cmake
# ${RPLY_CMAKE_DIR}/RPLYStandardOptions.cmake
# ${RPLY_CMAKE_DIR}/UseRPLY.cmake
)
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 2.6)
PROJECT(rply C)

SET(RPLY_LIB_MAJOR_VERSION 1)
SET(RPLY_LIB_MINOR_VERSION 01)

SET(RPLY_CMAKE_DIR ${CMAKE_SOURCE_DIR}/CMake/)
SET(RPLY_LIBRARY librply.so)

add_library(rply SHARED rply.c)
set_target_properties(rply PROPERTIES
VERSION ${RPLY_LIB_MAJOR_VERSION}.${RPLY_LIB_MINOR_VERSION}
SOVERSION ${RPLY_LIB_MAJOR_VERSION}
)

include_directories(${CMAKE_SOURCE_DIR})
add_executable(rply_convert etc/convert.c)
add_executable(rply_dump etc/dump.c)
add_executable(rply_sconvert etc/sconvert.c)
target_link_libraries(rply_convert rply)
target_link_libraries(rply_dump rply)
target_link_libraries(rply_sconvert rply)

# Installs the header files
install(FILES rply.h DESTINATION include/rply)

# Installs the target file
install(TARGETS rply LIBRARY DESTINATION lib${LIB_SUFFIX})
install(TARGETS rply_convert RUNTIME DESTINATION bin)
install(TARGETS rply_dump RUNTIME DESTINATION bin)
install(TARGETS rply_sconvert RUNTIME DESTINATION bin)

#This should be the last line of the project
SUBDIRS(CMake/export)