mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
use the cached value, and put copyrights
Albert Astals Cide agreed on relicensing it as BSD. svn path=/trunk/playground/graphics/cmake/modules/; revision=617214
This commit is contained in:
parent
021b3079b0
commit
451e99ece0
|
@ -4,36 +4,46 @@
|
||||||
# LIBGS_FOUND - system has libgs
|
# LIBGS_FOUND - system has libgs
|
||||||
# LIBGS_LIBRARY - Link this to use libgs
|
# LIBGS_LIBRARY - Link this to use libgs
|
||||||
#
|
#
|
||||||
|
# Copyright (c) 2006, Albert Astals Cid, <aacid@kde.org>
|
||||||
|
# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
|
|
||||||
# reset vars
|
if (LIBGS_LIBRARY)
|
||||||
set(LIBGS_LIBRARY)
|
# in cache already
|
||||||
|
set(LIBGS_FOUND TRUE)
|
||||||
|
else (LIBGS_LIBRARY)
|
||||||
|
|
||||||
set(CMAKE_LIBRARY_PATH "${LIB_INSTALL_DIR}")
|
set(CMAKE_LIBRARY_PATH "${LIB_INSTALL_DIR}")
|
||||||
find_library(LIBGS_LIBRARY NAMES gs gs-esp
|
find_library(LIBGS_LIBRARY NAMES gs gs-esp
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
${GNUWIN32_DIR}/lib
|
${GNUWIN32_DIR}/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LIBGS_LIBRARY)
|
if(LIBGS_LIBRARY)
|
||||||
check_library_exists(${LIBGS_LIBRARY} gsapi_new_instance "" LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
check_library_exists(${LIBGS_LIBRARY} gsapi_new_instance "" LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
||||||
|
|
||||||
if(LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
if(LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
||||||
set(LIBGS_FOUND TRUE)
|
set(LIBGS_FOUND TRUE)
|
||||||
endif(LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
endif(LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
||||||
endif(LIBGS_LIBRARY)
|
endif(LIBGS_LIBRARY)
|
||||||
set(CMAKE_LIBRARY_PATH)
|
set(CMAKE_LIBRARY_PATH)
|
||||||
|
|
||||||
if (LIBGS_FOUND)
|
if (LIBGS_FOUND)
|
||||||
if (NOT LIBGS_FIND_QUIETLY)
|
if (NOT LIBGS_FIND_QUIETLY)
|
||||||
message(STATUS "Found the GS library: ${LIBGS_LIBRARY}")
|
message(STATUS "Found the GS library: ${LIBGS_LIBRARY}")
|
||||||
endif (NOT LIBGS_FIND_QUIETLY)
|
endif (NOT LIBGS_FIND_QUIETLY)
|
||||||
else (LIBGS_FOUND)
|
else (LIBGS_FOUND)
|
||||||
if (LIBGS_FIND_REQUIRED)
|
if (LIBGS_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR "Could NOT find the GS library")
|
message(FATAL_ERROR "Could NOT find the GS library")
|
||||||
endif (LIBGS_FIND_REQUIRED)
|
endif (LIBGS_FIND_REQUIRED)
|
||||||
endif (LIBGS_FOUND)
|
endif (LIBGS_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(LIBGS_LIBRARY)
|
set(LIBGS_LIBRARY ${LIBGS_LIBRARY} CACHE INTERNAL "The GhostScript library")
|
||||||
|
|
||||||
|
endif (LIBGS_LIBRARY)
|
||||||
|
|
Loading…
Reference in a new issue