diff --git a/CMakeLists.txt b/CMakeLists.txt index a73bb56..cfa70ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,10 +161,17 @@ install(DIRECTORY src/core/common/ install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -set(PKG_CONFIG_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}") -set(PKG_CONFIG_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") -set(PKG_CONFIG_LIBS "-L\${libdir} -lopenjph") -set(PKG_CONFIG_CFLAGS "-I\${includedir}") +if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}") + set(PKG_CONFIG_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") +else() + set(PKG_CONFIG_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +endif() + +if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}") + set(PKG_CONFIG_LIBDIR "${CMAKE_INSTALL_LIBDIR}") +else() + set(PKG_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +endif() configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/src/pkg-config.pc.cmake" diff --git a/src/core/common/ojph_version.h b/src/core/common/ojph_version.h index ec87689..7169d7d 100644 --- a/src/core/common/ojph_version.h +++ b/src/core/common/ojph_version.h @@ -35,4 +35,4 @@ #define OPENJPH_VERSION_MAJOR 0 #define OPENJPH_VERSION_MINOR 14 -#define OPENJPH_VERSION_PATCH 1 +#define OPENJPH_VERSION_PATCH 2 diff --git a/src/pkg-config.pc.cmake b/src/pkg-config.pc.cmake index 546b267..617404c 100644 --- a/src/pkg-config.pc.cmake +++ b/src/pkg-config.pc.cmake @@ -5,5 +5,5 @@ Requires: @PKG_CONFIG_REQUIRES@ prefix=@CMAKE_INSTALL_PREFIX@ includedir=@PKG_CONFIG_INCLUDEDIR@ libdir=@PKG_CONFIG_LIBDIR@ -Libs: @PKG_CONFIG_LIBS@ -Cflags: @PKG_CONFIG_CFLAGS@ +Libs: -L${libdir} -lopenjph +Cflags: -I${includedir}