1 # - Try to find the install path of the required win32 supplementary libraries
3 # used environment vars
4 # KDEWIN_DIR - kdewin root dir
7 # KDEWIN_FOUND - system has KDEWIN
8 # KDEWIN_DIR - the KDEWIN root installation dir
10 # Copyright (c) 2007, Ralf Habacker, <ralf.habacker@freenet.de>
12 # Redistribution and use is allowed according to the terms of the BSD license.
13 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
17 # check for enviroment variable
18 file(TO_CMAKE_PATH "$ENV{KDEWIN_DIR}" KDEWIN_DIR)
20 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
22 set (DIR "kdewin-mingw")
24 set (DIR "kdewin-msvc")
27 # search in the default program install folder
28 find_file(KDEWIN_DIR_tmp ${DIR} kdewin kdewin32 gnuwin32 win32libs
32 set (KDEWIN_DIR ${KDEWIN_DIR_tmp})
33 endif (NOT KDEWIN_DIR)
35 message(STATUS "Found windows supplementary package location: ${KDEWIN_DIR}")
37 endif (NOT KDEWIN_DIR)
39 # this must be set every time
41 # add include path and library to all targets, this is required because
42 # cmake's 2.4.6 FindZLib.cmake does not use CMAKE_REQUIRED... vars
43 set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${KDEWIN_DIR}/include)
44 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${KDEWIN_DIR}/lib)
48 message(STATUS "Could not find the location of the windows supplementary packages which is \n"
49 "\t\tenvironment variable KDEWIN_DIR\n"
50 "\t\t<ProgramFiles>/${DIR}\n"
51 "\t\t<ProgramFiles>/kdewin\n"
52 "\t\t<ProgramFiles>/kdewin32\n"
53 "\t\t<ProgramFiles>/gnuwin32\n")