Use_wxWindows.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # - Find wxWindows installation
  2. #
  3. # This convenience include finds if wxWindows is installed
  4. # and set the appropriate libs, incdirs, flags etc.
  5. # INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
  6. # are called.
  7. # author Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> (07/2003)
  8. #
  9. # if you are sure you need GL then
  10. # SET(WXWINDOWS_USE_GL 1)
  11. # *before* you include this file.
  12. #
  13. INCLUDE(FindwxWindows)
  14. IF(WXWINDOWS_FOUND)
  15. #MESSAGE("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}")
  16. IF(WXWINDOWS_INCLUDE_DIR)
  17. INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
  18. ENDIF(WXWINDOWS_INCLUDE_DIR)
  19. IF(WXWINDOWS_LINK_DIRECTORIES)
  20. LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})
  21. ENDIF(WXWINDOWS_LINK_DIRECTORIES)
  22. IF(WXWINDOWS_LIBRARIES)
  23. LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})
  24. ENDIF(WXWINDOWS_LIBRARIES)
  25. IF (CMAKE_WXWINDOWS_CXX_FLAGS)
  26. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
  27. ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)
  28. IF(WXWINDOWS_DEFINITIONS)
  29. ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})
  30. ENDIF(WXWINDOWS_DEFINITIONS)
  31. ELSE(WXWINDOWS_FOUND)
  32. MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
  33. ENDIF(WXWINDOWS_FOUND)