[A] Added package-config files to build and installation
This commit is contained in:
parent
d5cbf91b90
commit
ff0e78eeeb
@ -1,6 +1,10 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(libfort)
|
||||
project(libfort VERSION 0.1.5)
|
||||
|
||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
|
||||
"\\1.\\2" libfort_SOVERSION
|
||||
${libfort_VERSION})
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
||||
|
||||
@ -180,6 +184,7 @@ endif()
|
||||
|
||||
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Set preprocessor macros for all test builds
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -9,8 +9,8 @@ target_include_directories(fort
|
||||
)
|
||||
|
||||
set_target_properties(fort
|
||||
PROPERTIES VERSION 0.1.4
|
||||
SOVERSION 0.1)
|
||||
PROPERTIES VERSION ${libfort_VERSION}
|
||||
SOVERSION ${libfort_SOVERSION})
|
||||
|
||||
if(FORT_HAVE_WCHAR)
|
||||
target_compile_definitions(fort
|
||||
@ -30,3 +30,6 @@ install(
|
||||
)
|
||||
|
||||
install(FILES fort.h fort.hpp DESTINATION include)
|
||||
|
||||
configure_file(libfort.pc.in libfort.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libfort.pc DESTINATION lib/pkgconfig)
|
||||
|
10
lib/libfort.pc.in
Normal file
10
lib/libfort.pc.in
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
includedir=${prefix}/include
|
||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
|
||||
Name: libfort
|
||||
Description: A simple C/C++ crossplatform library to create formatted text tables.
|
||||
Version: @libfort_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lfort
|
Loading…
Reference in New Issue
Block a user