Use_wxWindows.cmake 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #
  8. # author Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> (07/2003)
  9. #
  10. # if you are sure you need GL then
  11. # SET(WXWINDOWS_USE_GL 1)
  12. # *before* you include this file.
  13. #
  14. INCLUDE(FindwxWindows)
  15. IF(WXWINDOWS_FOUND)
  16. #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}")
  17. IF(WXWINDOWS_INCLUDE_DIR)
  18. INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
  19. ENDIF(WXWINDOWS_INCLUDE_DIR)
  20. IF(WXWINDOWS_LINK_DIRECTORIES)
  21. LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})
  22. ENDIF(WXWINDOWS_LINK_DIRECTORIES)
  23. IF(WXWINDOWS_LIBRARIES)
  24. LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})
  25. ENDIF(WXWINDOWS_LIBRARIES)
  26. IF (CMAKE_WXWINDOWS_CXX_FLAGS)
  27. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
  28. ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)
  29. IF(WXWINDOWS_DEFINITIONS)
  30. ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})
  31. ENDIF(WXWINDOWS_DEFINITIONS)
  32. ELSE(WXWINDOWS_FOUND)
  33. MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
  34. ENDIF(WXWINDOWS_FOUND)