[Cmake] INCLUDE_DIRECTORIES and empty strings
Sebastien BARRE
sebastien.barre at kitware.com
Mon Jun 24 15:46:20 EDT 2002
At 6/24/2002 03:33 PM, Wheeler, Fred (Research) wrote:
>With CMake 1.4 beta making NMake makefiles in win32, the following
>
> SET( OPENGL_INCLUDE_PATH "" )
> INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_PATH})
>
>leads to compile commands that look like this
[...]
>Bottom line: it would be nice if INCLUDE_DIRECTORIES did nothing when
>passed an empty string.
You can test if your var is empty before trying to "include" it.
CMake 1.2, 1.4beta and CVS always had the same behaviour regarding
OPENGL_INCLUDE_PATH in the FindOpenGL.cmake module: it is not defined for
Win32 system.
What is done in VTK is:
IF (OPENGL_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_PATH})
ENDIF(OPENGL_INCLUDE_PATH)
--
Sebastien Barre
More information about the CMake
mailing list