Hi Stephen,

the module should work without problems for Linux as long as (the correct) wx-config is in the path environment variable. The module does practically the same as you do with EXEC_PROGRAM. So if you CMakeLists.txt works, the wxWidgets cmake module should also work.

Find the module FindwxWidgets.cmake and uncomment line 100

# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")

to get some debug messages. Maybe this gives you a hint what is wrong.

Regards,
Werner

Stephen Adler wrote:
CMake folks...

I'm setting up a project using vxWidget and cmake. I've run across a configuration dilema. I've followed the instructions on how to use the wxWidgets file module .cmake as found in ${CMAKE_ROOT}/Modules/FindwxWidgets.cmake, but it does not seem to find my wxWidget install. (My guess is that I'm actually using wxGTK, which is the GTK port of wxWidget.)

wxWidget software is setup to use the wx-config command which dumps to stdout the various compialiation and ld switches needed to properly build a wxWidget application. So, I added the following lines to my CMakeLists.txt file.

EXEC_PROGRAM(wx-config ARGS --cxxflags OUTPUT_VARIABLE WXCXXFLAGS)
EXEC_PROGRAM(wx-config ARGS --libs OUTPUT_VARIABLE WXFLAGS)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WXCXXFLAGS}")

ADD_EXECUTABLE(wxHello wxHello.cpp)

TARGET_LINK_LIBRARIES(wxHello ${WXFLAGS})

This seems to work fine. Is there any reason I should avoid using the 'execute wx-config program and stuff the output into CMAKE_CXX_FLAGS' method, and stick to using the more traditional method of including the Find module for wxWidgets?

Cheers. Steve.

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


--
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
      +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to