2 # This module finds if GSLOBJ is installed and determines where the
3 # include files and libraries are. It also determines what the name of
4 # the library is. This code sets the following variables:
6 # GSLOBJ_FOUND = system has GSLOBJ and it should be used
7 # GSLOBJ_LIBRARIES = full path to the GSLOBJ library and linker flags on unix
8 # CMAKE_GSLOBJ_CXX_FLAGS = compiler flags for building GSLOBJ
9 # GSLOBJ_INCLUDE_DIR = include path of GSLOBJ
13 SET (GSLOBJ_POSSIBLE_LIB_PATHS
15 $ENV{CREATIS}/gslobj/win32inst/lib
16 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GSLobj_is1;Inno Setup: App Path]/lib"
19 FIND_LIBRARY(GSLOBJ_STATIC_LIBRARY
21 PATHS ${GSLOBJ_POSSIBLE_LIB_PATHS}
24 SET (GSLOBJ_POSSIBLE_INCLUDE_PATHS
26 $ENV{CREATIS}/gslobj/win32inst/include
27 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GSLobj_is1;Inno Setup: App Path]/include"
30 FIND_PATH(GSLOBJ_INCLUDE_DIR
32 ${GSLOBJ_POSSIBLE_INCLUDE_PATHS}
35 SET(GSLOBJ_LIBRARIES ${GSLOBJ_STATIC_LIBRARY} ${CMAKE_GSLOBJ_LIBRARIES})
46 FIND_PROGRAM(CMAKE_GSLOBJ_CONFIG gslobj-config ../gslobj/bin ../../gslobj/bin)
47 SET(CMAKE_GSLOBJ_CXX_FLAGS "`${CMAKE_GSLOBJ_CONFIG} --cflags`")
48 SET(GSLOBJ_LIBRARIES "`${CMAKE_GSLOBJ_CONFIG} --libs`")
53 CMAKE_GSLOBJ_CXX_FLAGS
58 IF(GSLOBJ_INCLUDE_DIR OR CMAKE_GSLOBJ_CXX_FLAGS)
59 SET(CMAKE_GSLOBJ_CAN_COMPILE 1)
61 ENDIF(GSLOBJ_INCLUDE_DIR OR CMAKE_GSLOBJ_CXX_FLAGS)
62 ENDIF(GSLOBJ_LIBRARIES)