summaryrefslogtreecommitdiffstats
path: root/Modules/FindGTK2.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-08-02 15:39:28 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 00:19:29 (GMT)
commitfab6c2deb0ced0d4a0623fe2dfd56c0b235a5ca1 (patch)
treec525f09374bddb4a0d005a2583114da07db0d01e /Modules/FindGTK2.cmake
parent8d7b070410714a8c87c9ec51358fbd0e446b6681 (diff)
downloadCMake-fab6c2deb0ced0d4a0623fe2dfd56c0b235a5ca1.zip
CMake-fab6c2deb0ced0d4a0623fe2dfd56c0b235a5ca1.tar.gz
CMake-fab6c2deb0ced0d4a0623fe2dfd56c0b235a5ca1.tar.bz2
FindGTK2: Populate GTK2_DEFINITIONS before searching for libraries
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r--Modules/FindGTK2.cmake28
1 files changed, 14 insertions, 14 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 669d5d2..22b4707 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -450,6 +450,20 @@ if(GTK2_FIND_VERSION)
endif()
#
+# On MSVC, according to https://wiki.gnome.org/gtkmm/MSWindows, the /vd2 flag needs to be
+# passed to the compiler in order to use gtkmm
+#
+if(MSVC)
+ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
+ if(_GTK2_component STREQUAL "gtkmm")
+ set(GTK2_DEFINITIONS "/vd2")
+ elseif(_GTK2_component STREQUAL "glademm")
+ set(GTK2_DEFINITIONS "/vd2")
+ endif()
+ endforeach()
+endif()
+
+#
# Find all components
#
@@ -566,20 +580,6 @@ if(NOT GTK2_FIND_VERSION AND GTK2_GTK_INCLUDE_DIR)
endif()
#
-# On MSVC, according to https://wiki.gnome.org/gtkmm/MSWindows, the /vd2 flag needs to be
-# passed to the compiler in order to use gtkmm
-#
-if(MSVC)
- foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
- if(_GTK2_component STREQUAL "gtkmm")
- set(GTK2_DEFINITIONS "/vd2")
- elseif(_GTK2_component STREQUAL "glademm")
- set(GTK2_DEFINITIONS "/vd2")
- endif()
- endforeach()
-endif()
-
-#
# Try to enforce components
#