From b6fa2778accd1c534ea4133b319e799c361d55b4 Mon Sep 17 00:00:00 2001 From: Vilya Harvey Date: Tue, 24 Aug 2010 17:50:53 +0100 Subject: [PATCH] Found out I should have been using find_package() in CMake instead of including the FindXXX modules directly. --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df18642..3f88ee5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,14 @@ project(VGL) cmake_minimum_required(VERSION 2.6) # External libraries that we use. -include(FindGLUT) -include(FindJPEG) -include(FindPNG) -include(FindOpenGL) -include(FindOpenMP) -include(FindTIFF) +find_package(GLUT) +find_package(JPEG) +find_package(PNG) +find_package(OpenGL) +find_package(OpenMP) +find_package(TIFF) + +add_definitions(${PNG_DEFINITIONS}) # There's no ready-made CMake module for setting up cppunit, so it's DIY time... find_library(CPPUNIT_LIBRARY cppunit)