Skip to content
Browse files

Disable gio_demo for earlier cmake versions (< 2.8.11).

  • Loading branch information...
1 parent 8772313 commit 08cbf90ae4daf7934422dfbeb3dbc335ddf1c278 @jtappin jtappin committed Nov 19, 2013
Showing with 10 additions and 3 deletions.
  1. +5 −0 CMakeLists.txt
  2. +5 −3 examples/CMakeLists.txt
View
5 CMakeLists.txt
@@ -29,6 +29,11 @@
cmake_minimum_required(VERSION 2.8.5)
project(gtk-fortran C Fortran)
+# CMAKE versions up to and including 2.8.10 fail to add the GIO libs for GTK2
+if (CMAKE_VERSION VERSION_LESS 2.8.11)
+ message(STATUS "CMAKE Version before 2.8.11 -- GIO example will not be built")
+endif()
+
include(CheckCSourceCompiles)
# Note that we override the lib directory here because most
View
8 examples/CMakeLists.txt
@@ -192,9 +192,11 @@ if (NOT NO_BUILD_EXAMPLES)
target_link_libraries(notebooks gtk-fortran_static ${GTK_LIBRARIES})
add_test(notebooks ./notebooks)
- add_executable(gio_demo "gio_demo.f90")
- target_link_libraries(gio_demo gtk-fortran_static ${GTK_LIBRARIES})
- add_test(gio_demo ./gio_demo)
+ if (CMAKE_VERSION VERSION_GREATER 2.8.10)
+ add_executable(gio_demo "gio_demo.f90")
+ target_link_libraries(gio_demo gtk-fortran_static ${GTK_LIBRARIES})
+ add_test(gio_demo ./gio_demo)
+ endif()
add_executable(tests "tests.f90")
target_link_libraries(tests gtk-fortran_static ${GTK_LIBRARIES})

0 comments on commit 08cbf90

Please sign in to comment.
Something went wrong with that request. Please try again.