diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-02-12 14:38:04 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-02-12 14:38:04 +0000 |
commit | 75a07dd38b4a491a9d16d24492bea5c6ba90a8ff (patch) | |
tree | 0a65094e22bba335545b8ffe4a33fe7790edb21c /modules/FindGNUWIN32.cmake | |
parent | bce40e0de3b22a291ecaa2b75358e6a998e1579b (diff) | |
download | extra-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/FindGNUWIN32.cmake')
-rw-r--r-- | modules/FindGNUWIN32.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/FindGNUWIN32.cmake b/modules/FindGNUWIN32.cmake new file mode 100644 index 00000000..fc57f022 --- /dev/null +++ b/modules/FindGNUWIN32.cmake @@ -0,0 +1,32 @@ +IF (WIN32) + +INCLUDE(MacroGetenvWinPath) + +MACRO_GETENV_WIN_PATH(_progFiles PROGRAMFILES) + +FIND_FILE(GNUWIN32_DIR GNUWIN32 + ${_progFiles} + "C:/" +) + +IF(GNUWIN32_DIRECTORY) + SET(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include) + SET(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib) + SET(GNUWIN32_BINARY_DIR ${GNUWIN32_DIR}/bin) + SET(GNUWIN32_FOUND TRUE) +ELSE(GNUWIN32_DIRECTORY) + SET(GNUWIN32_FOUND) +ENDIF(GNUWIN32_DIRECTORY) + +IF(GNUWIN32_FOUND) + IF(NOT GNUWIN32_FIND_QUIETLY) + MESSAGE(STATUS "Found GNUWIN32: ${GNUWIN32_DIR}") + ENDIF(NOT GNUWIN32_FIND_QUIETLY) +ELSE(GNUWIN32_FOUND) + IF(GNUWIN32_FIND_REQUIRED) + MESSAGE(SEND_ERROR "Could not find GNUWIN32") + ENDIF(GNUWIN32_FIND_REQUIRED) +ENDIF(GNUWIN32_FOUND) + +ENDIF (WIN32) + |