aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDE4.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2006-02-12 14:38:04 +0000
committerAlexander Neundorf <neundorf@kde.org>2006-02-12 14:38:04 +0000
commit75a07dd38b4a491a9d16d24492bea5c6ba90a8ff (patch)
tree0a65094e22bba335545b8ffe4a33fe7790edb21c /modules/FindKDE4.cmake
parentbce40e0de3b22a291ecaa2b75358e6a998e1579b (diff)
downloadextra-cmake-modules-75a07dd38b4a491a9d16d24492bea5c6ba90a8ff.tar.gz
extra-cmake-modules-75a07dd38b4a491a9d16d24492bea5c6ba90a8ff.tar.bz2
-moved the cmake code to find kdewin32 out of FindKDE4.cmake and into its own FindKDEWIN32.cmake file
-added a new FindGNUWIN32.cmake file, which tries to find the gnuwin32 base directory -changed all "FOO_LIBRARY" variable names to "FOO_LIBRARIES" to be more consistent with the other cmake modules -added a macro_getenv_win_path() which replaces all backslahes with slashes from environment variables -modified the kde4_add_kcfg_files() command, so that the generated header is also processed by moc -all tests compile and link Alex CCMAIL:kde-buildsystem@kde.org The changes to the windows stuff are untested, since I don't have a windows box. Please check that everything still works. Please have a look at FindGNUWIN32.cmake, there are probably ways to improve this. The resulting GNUWIN32_DIR variable is used in other cmake modules as default path to search for headers and libraries. svn path=/trunk/KDE/kdelibs/; revision=508648
Diffstat (limited to 'modules/FindKDE4.cmake')
-rw-r--r--modules/FindKDE4.cmake37
1 files changed, 2 insertions, 35 deletions
diff --git a/modules/FindKDE4.cmake b/modules/FindKDE4.cmake
index 12e6b89b..f0b82112 100644
--- a/modules/FindKDE4.cmake
+++ b/modules/FindKDE4.cmake
@@ -193,43 +193,10 @@ IF (WIN32)
MESSAGE(FATAL_ERROR "Support for Cygwin not yet implemented, please edit FindKDE4.cmake to enable it")
ENDIF(CYGWIN)
-
- # at first find the kdewin32 library, this has to be compiled and installed before kdelibs/
- # search for kdewin32 in the default install directory for applications (default of (n)make install)
- FIND_LIBRARY(KDEWIN32_LIBRARY NAMES kdewin32 PATHS
- $ENV{ProgramFiles}/kdewin32/lib )
- FIND_PATH(KDEWIN32_INCLUDE_DIR winposix_export.h
- $ENV{ProgramFiles}/kdewin32/include )
-
-
- # kdelibs/win/ has to be built before the rest of kdelibs/
- # eventually it will be moved out from kdelibs/
- IF (NOT KDEWIN32_LIBRARY OR NOT KDEWIN32_INCLUDE_DIR)
- MESSAGE(FATAL_ERROR "Could not find kdewin32 library, build and install kdelibs/win/ before building kdelibs/")
- ENDIF (NOT KDEWIN32_LIBRARY OR NOT KDEWIN32_INCLUDE_DIR)
-
- # add the winsock2 library, using find_library or something like this would probably be better
- SET(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY} user32)
- SET(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY} shell32)
- SET(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY} ws2_32)
-
- IF(MINGW)
- #mingw compiler
- SET(KDEWIN32_INCLUDES ${KDEWIN32_INCLUDE_DIR} ${KDEWIN32_INCLUDE_DIR}/mingw ${QT_INCLUDES})
- ELSE(MINGW)
- # msvc compiler
- SET(KDEWIN32_INCLUDES ${KDEWIN32_INCLUDE_DIR} ${KDEWIN32_INCLUDE_DIR}/msvc ${QT_INCLUDES})
-
- # add the MS SDK include directory if available
- SET(MS_SDK_DIR $ENV{MSSdk})
- IF (MS_SDK_DIR)
- SET(KDEWIN32_INCLUDES ${KDEWIN32_INCLUDES} ${MS_SDK_DIR}/include )
- ENDIF (MS_SDK_DIR)
-
- ENDIF(MINGW)
+ FIND_PACKAGE(KDEWIN32 REQUIRED)
SET( _KDE4_PLATFORM_INCLUDE_DIRS ${KDEWIN32_INCLUDES})
- SET( QT_AND_KDECORE_LIBS ${QT_AND_KDECORE_LIBS} ${KDEWIN32_LIBRARY} )
+ SET( QT_AND_KDECORE_LIBS ${QT_AND_KDECORE_LIBS} ${KDEWIN32_LIBRARIES} )
# windows, mingw
IF(MINGW)