KDE/kdelibs/cmake/modules
Alexander Neundorf
neundorf at kde.org
Mon Jun 9 21:37:03 CEST 2008
SVN commit 818834 by neundorf:
-some minor reorganization of some windows stuff, centralizing it a bit more
Please test on Windows to make sure I didn't mess up anything.
Alex
CCMAIL: kde-windows at kde.org
M +22 -19 FindKDE4Internal.cmake
--- trunk/KDE/kdelibs/cmake/modules/FindKDE4Internal.cmake #818833:818834
@@ -673,6 +673,7 @@
############## add some more default search paths ###############
+#
# always search in the directory where cmake is installed
# and in the current installation prefix
# the KDE4_xxx_INSTALL_DIR variables are empty when building kdelibs itself
@@ -707,7 +708,9 @@
endif(WIN32)
-##################### and now the platform specific stuff ############################
+######################################################
+# and now the platform specific stuff
+######################################################
# Set a default build type for single-configuration
# CMake generators if no build type is set.
@@ -744,10 +747,11 @@
set( KDE4_KDECORE_LIBS ${KDE4_KDECORE_LIBS} ${KDEWIN32_LIBRARIES} )
endif (_kdeBootStrapping)
- # windows, mingw
- if(MINGW)
- #hmmm, something special to do here ?
- endif(MINGW)
+ # we prefer to use a different postfix for debug libs only on Windows
+ # does not work atm
+ if (WIN32)
+ set(CMAKE_DEBUG_POSTFIX "")
+ endif (WIN32)
# windows, microsoft compiler
if(MSVC)
@@ -878,7 +882,13 @@
set ( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -lc")
endif (CMAKE_SYSTEM_NAME MATCHES BSD)
-# compiler specific stuff, maybe this should be done differently, Alex
+
+############################################################
+# compiler specific settings
+############################################################
+
+
+# this macro is for internal use only.
macro(KDE_CHECK_FLAG_EXISTS FLAG VAR DOC)
if(NOT ${VAR} MATCHES "${FLAG}")
set(${VAR} "${${VAR}} ${FLAG}" CACHE STRING "Flags used by the linker during ${DOC} builds." FORCE)
@@ -896,12 +906,6 @@
endif(MSVC)
-if (MINGW)
- set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--disable-auto-import")
- set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--disable-auto-import")
-endif (MINGW)
-
-
if (CMAKE_COMPILER_IS_GNUCXX)
set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
# Select flags.
@@ -922,13 +926,17 @@
add_definitions (-D_BSD_SOURCE)
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
- if (WIN32)
+ # gcc under Windows
+ if (MINGW)
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--disable-auto-import")
+ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--disable-auto-import")
+
# we always link against the release version of QT with mingw
# (even for debug builds). So we need to define QT_NO_DEBUG
# or else QPluginLoader rejects plugins because it thinks
# they're built against the wrong QT.
add_definitions(-DQT_NO_DEBUG)
- endif (WIN32)
+ endif (MINGW)
check_cxx_compiler_flag(-fPIE HAVE_FPIE_SUPPORT)
if(KDE4_ENABLE_FPIE)
@@ -1028,11 +1036,6 @@
endif (CMAKE_C_COMPILER MATCHES "icc")
-# we prefer to use a different postfix for debug libs only on Windows
-# does not work atm
-if (WIN32)
- SET(CMAKE_DEBUG_POSTFIX "")
-endif (WIN32)
########### end of platform specific stuff ##########################
More information about the Kde-windows
mailing list