File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1111
1212cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
1313
14+ set (PROJECT_DESCRIPTION "A Fortran 2008 JSON API" )
15+ set (PROJECT_URL "https://github.com/jacobwilliams/json-fortran" )
16+
1417# Set the type/configuration of build to perform
1518set ( CMAKE_CONFIGURATION_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo" )
1619set ( CMAKE_BUILD_TYPE "Release"
@@ -39,7 +42,8 @@ string( REPLACE "." ";" VERSION_LIST ${VERSION} )
3942list (GET VERSION_LIST 0 VERSION_MAJOR)
4043list (GET VERSION_LIST 1 VERSION_MINOR)
4144list (GET VERSION_LIST 2 VERSION_PATCH)
42- message ( STATUS "CMake build configuration for JSON-Fortran ${VERSION_MAJOR} .${VERSION_MINOR} .${VERSION_PATCH} " )
45+ set (PROJECT_VERSION "${VERSION_MAJOR} .${VERSION_MINOR} .${VERSION_PATCH} " )
46+ message ( STATUS "CMake build configuration for JSON-Fortran ${PROJECT_VERSION} " )
4347
4448#-------------------------------------
4549# Collect source files for the library
@@ -397,3 +401,14 @@ set ( ENABLE_BUILD_TREE_EXPORT FALSE CACHE BOOL
397401if ( ENABLE_BUILD_TREE_EXPORT )
398402 export ( PACKAGE ${PACKAGE_NAME} )
399403endif ()
404+
405+ # pkg-config stuff
406+ configure_file (
407+ "${CMAKE_CURRENT_SOURCE_DIR} /json-fortran.pc.cmake.in"
408+ "${CMAKE_CURRENT_BINARY_DIR} /json-fortran.pc"
409+ @ONLY
410+ )
411+ install (FILES
412+ "${CMAKE_CURRENT_BINARY_DIR} /json-fortran.pc"
413+ DESTINATION "${CMAKE_INSTALL_LIBDIR} /pkgconfig"
414+ )
Original file line number Diff line number Diff line change 1+ libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2+ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
3+
4+ Name : json-fortran
5+ Description: @PROJECT_DESCRIPTION@
6+ URL: @PROJECT_URL@
7+ Version : @PROJECT_VERSION@
8+ Libs: -L${libdir} -ljsonfortran
9+ Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments