[CMake] FindxxWidgets.cmake: wrong wxWidgets_INCLUDE_DIRS on UNIX

Florent Teichteil florent.teichteil at gmail.com
Wed Jul 1 13:23:27 EDT 2009


Hi,

I am trying to write a CMakeLists.txt file on a Linux Ubuntu 9.04 
platform. I'd like to test the presence of wxwidgets on the system, and 
  use the include files of wxwidgets. This file is very simple at the 
moment:

// BEGINNING OF CMakeLists.txt

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(wxWidgets COMPONENTS base core REQUIRED)
include_directories(${wxWidgets_INCLUDE_DIRS})
add_definitions(${wxWidgets_DEFINITIONS})
message(STATUS ${wxWidgets_INCLUDE_DIRS})

// END OF CMakeLists.txt

When I run "cmake ." in a terminal window, I get the following output:

-- /usr/lib/wx/include/gtk2-unicode-release-2.8/usr/include/wx-2.8
-- Configuring done
-- Generating done

The first line gives the value of "wxWidgets_INCLUDE_DIRS" which is 
obviously wrong. It seems 2 paths have been concatenated without white 
space. I think it should be something like 
"/usr/lib/wx/include/gtk2-unicode-release-2.8 /usr/include/wx-2.8".

All the best,
Florent


More information about the CMake mailing list