[cmake-developers] [CMake 0013198]: FindFLTK cannot be called multiple times

Mantis Bug Tracker mantis at public.kitware.com
Sun May 6 13:51:45 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=13198 
====================================================================== 
Reported By:                Modestas Vainius
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13198
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-05-06 13:51 EDT
Last Modified:              2012-05-06 13:51 EDT
====================================================================== 
Summary:                    FindFLTK cannot be called multiple times
Description: 
Hello,

original bug has originally been reported at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=671746

----------------------
FLTK cannot be found more than once:

% cat CMakeLists.txt 
cmake_minimum_required(VERSION 2.8)

find_package(FLTK)
find_package(FLTK)
% cmake .
CMake Error at /usr/share/cmake-2.8/Modules/FindFLTK.cmake:134 (IF):
  if given arguments:

    "EXISTS" "/usr/lib/fltk" "/usr/include/FLTKConfig.cmake"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
------------------------

The problem is that FLTK_INCLUDE_DIR is a list when FindFLTK is called the
second time. The list was created by:

LIST(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY})

However, FLTK_DIR is expected to be a single variable:

IF(FLTK_INCLUDE_DIR)
  SET(FLTK_DIR ${FLTK_INCLUDE_DIR})
ENDIF(FLTK_INCLUDE_DIR)
....
IF(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
    SET(FLTK_BUILT_WITH_CMAKE 1)
ENDIF(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-05-06 13:51 Modestas VainiusNew Issue                                    
======================================================================




More information about the cmake-developers mailing list