build-sys: Provide a simple CMake Config setup (similar to pkgconfig)

I'd rather not have to do this, as I don't really see the point in
duplicating what is done in pkgconfig, but this is likely the
easiest way to avoid nasty hacks.
This commit is contained in:
Colin Guthrie 2011-10-11 20:42:42 +01:00
parent 034006ec90
commit ce546b22eb
4 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,11 @@
set(PACKAGE_VERSION @PA_MAJOR@.@PA_MINOR@)
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )