+
+#-----------------------------------------------------------------------------
+# pkgconfig support
+# enabled by default on Unix or if using GCC, disabled by default on other platforms
+if(UNIX OR CMAKE_COMPILER_IS_GNUCC)
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
+else()
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
+endif()
+if(BUILD_PKGCONFIG_FILES)
+ # install in lib and not share (see multi-arch note above)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
+ ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
+#
+ if(BUILD_JPIP)
+ # install in lib and not share (see multi-arch note above)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
+ ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
+ endif()
+endif()
+
+#-----------------------------------------------------------------------------
+
+# build our version of astyle
+SET (WITH_ASTYLE FALSE CACHE BOOL "If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)")