mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
First check for the library, then look for the needed symbol.
I think that's a bit more logical ;-) svn path=/branches/work/kde4/playground/graphics/cmake/; revision=525060
This commit is contained in:
parent
404007d26a
commit
86423f06b3
|
@ -9,9 +9,6 @@ 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
|
||||
|
@ -19,16 +16,21 @@ if(LIBGS_LIBRARY)
|
|||
${GNUWIN32_DIR}/lib
|
||||
)
|
||||
|
||||
if(LIBGS_LIBRARY)
|
||||
check_library_exists(gs gsapi_new_instance "" LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
||||
|
||||
if(LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
||||
set(LIBGS_FOUND TRUE)
|
||||
endif(LIBGS_HAVE_GSAPI_NEW_INSTANCE)
|
||||
endif(LIBGS_LIBRARY)
|
||||
|
||||
if (LIBGS_FOUND)
|
||||
if (NOT LIBGS_FIND_QUIETLY)
|
||||
message(STATUS "Found qgs: ${LIBGS_LDFLAGS}")
|
||||
message(STATUS "Found the GS library: ${LIBGS_LDFLAGS}")
|
||||
endif (NOT LIBGS_FIND_QUIETLY)
|
||||
else (LIBGS_FOUND)
|
||||
if (LIBGS_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find QGS")
|
||||
message(FATAL_ERROR "Could NOT find the GS library")
|
||||
endif (LIBGS_FIND_REQUIRED)
|
||||
endif (LIBGS_FOUND)
|
||||
|
||||
|
|
Loading…
Reference in a new issue