mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
adding libqgs for Qt4, remember it is a pure Qt lib ( well lets call it lib even if its only a file ;-) )
svn path=/branches/work/kde4/playground/graphics/cmake/; revision=524640
This commit is contained in:
parent
70504a71cf
commit
f24d0902ce
35
cmake/modules/modules/FindLIBGS.cmake
Normal file
35
cmake/modules/modules/FindLIBGS.cmake
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# - Try to find the libgs library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBGS_FOUND - system has libgs
|
||||||
|
# LIBGS_LIBRARY - Link this to use libgs
|
||||||
|
#
|
||||||
|
include(CheckLibraryExists)
|
||||||
|
|
||||||
|
# reset vars
|
||||||
|
set(LIBGS_LIBRARY)
|
||||||
|
|
||||||
|
check_library_exists(gs gsapi_new_instance "" LIBGS_LIBRARY)
|
||||||
|
|
||||||
|
if(LIBGS_LIBRARY)
|
||||||
|
find_library(LIBGS_LDFLAGS NAMES gs
|
||||||
|
PATHS
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
${GNUWIN32_DIR}/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
set(LIBGS_FOUND TRUE)
|
||||||
|
endif(LIBGS_LIBRARY)
|
||||||
|
|
||||||
|
if (LIBGS_FOUND)
|
||||||
|
if (NOT LIBGS_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found qgs: ${LIBGS_LDFLAGS}")
|
||||||
|
endif (NOT LIBGS_FIND_QUIETLY)
|
||||||
|
else (LIBGS_FOUND)
|
||||||
|
if (LIBGS_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could NOT find QGS")
|
||||||
|
endif (LIBGS_FIND_REQUIRED)
|
||||||
|
endif (LIBGS_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(LIBGS_LIBRARY)
|
|
@ -10,28 +10,26 @@ include(CheckLibraryExists)
|
||||||
# reset vars
|
# reset vars
|
||||||
set(QGS_INCLUDE_DIR)
|
set(QGS_INCLUDE_DIR)
|
||||||
set(QGS_LIBRARY)
|
set(QGS_LIBRARY)
|
||||||
set(QGS_HAVE_MAIN FALSE)
|
|
||||||
|
|
||||||
FIND_PATH(QGS_INCLUDE_DIR qgs.h
|
FIND_PATH(QGS_INCLUDE_DIR qgs.h
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/include
|
/usr/include
|
||||||
${GNUWIN32_DIR}/include
|
${GNUWIN32_DIR}/include
|
||||||
|
${KDE4_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ${KDE4_INCLUDE_DIR}/../lib IS UBER UGLY but i did not found a better way
|
||||||
find_library(QGS_LIBRARY NAMES qgs
|
find_library(QGS_LIBRARY NAMES qgs
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
${GNUWIN32_DIR}/lib
|
${GNUWIN32_DIR}/lib
|
||||||
|
${KDE4_INCLUDE_DIR}/../lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if (QGS_LIBRARY)
|
if(QGS_INCLUDE_DIR AND QGS_LIBRARY)
|
||||||
check_library_exists(qgs main "" QGS_HAVE_MAIN)
|
|
||||||
endif (QGS_LIBRARY)
|
|
||||||
|
|
||||||
if(QGS_INCLUDE_DIR AND QGS_LIBRARY AND QGS_HAVE_MAIN)
|
|
||||||
set(QGS_FOUND TRUE)
|
set(QGS_FOUND TRUE)
|
||||||
endif(QGS_INCLUDE_DIR AND QGS_LIBRARY AND QGS_HAVE_MAIN)
|
endif(QGS_INCLUDE_DIR AND QGS_LIBRARY)
|
||||||
|
|
||||||
if (QGS_FOUND)
|
if (QGS_FOUND)
|
||||||
if (NOT QGS_FIND_QUIETLY)
|
if (NOT QGS_FIND_QUIETLY)
|
||||||
|
|
Loading…
Reference in a new issue