From fab6c2deb0ced0d4a0623fe2dfd56c0b235a5ca1 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Fri, 2 Aug 2013 17:39:28 +0200 Subject: FindGTK2: Populate GTK2_DEFINITIONS before searching for libraries --- Modules/FindGTK2.cmake | 28 ++++++++++++++-------------- 1 file 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 # -- cgit v0.12