diff options
author | Brad King <brad.king@kitware.com> | 2013-07-02 13:05:05 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-02 13:05:05 (GMT) |
commit | 8b230454904bdcef91c3db2afca50608b8dbe569 (patch) | |
tree | 50ad338af06fcc3126d55968987aed416ccc4267 /Modules/FindGTK2.cmake | |
parent | 31d55ee8ac92a7cd751bf43b24f684b6c18fda4e (diff) | |
parent | 60e4555c89500a5ba0548ac59a12fe6a72cfba8d (diff) | |
download | CMake-8b230454904bdcef91c3db2afca50608b8dbe569.zip CMake-8b230454904bdcef91c3db2afca50608b8dbe569.tar.gz CMake-8b230454904bdcef91c3db2afca50608b8dbe569.tar.bz2 |
Merge topic 'FindGTK2vd2'
60e4555 FindGTK2: Add GTK2_DEFINITIONS variable
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r-- | Modules/FindGTK2.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index c466633..de17f16 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -18,6 +18,7 @@ # GTK2_FOUND - Were all of your specified components found? # GTK2_INCLUDE_DIRS - All include directories # GTK2_LIBRARIES - All libraries +# GTK2_DEFINITIONS - Additional compiler flags # # GTK2_VERSION - The version of GTK2 found (x.y.z) # GTK2_MAJOR_VERSION - The major version of GTK2 @@ -377,6 +378,7 @@ endfunction() set(GTK2_FOUND) set(GTK2_INCLUDE_DIRS) set(GTK2_LIBRARIES) +set(GTK2_DEFINITIONS) if(NOT GTK2_FIND_COMPONENTS) # Assume they only want GTK @@ -545,6 +547,20 @@ 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 # @@ -612,6 +628,7 @@ else() set(GTK2_VERSION_PATCH) set(GTK2_INCLUDE_DIRS) set(GTK2_LIBRARIES) + set(GTK2_DEFINITIONS) endif() if(GTK2_INCLUDE_DIRS) |