CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. IF(COMMAND cmake_policy)
  2. CMAKE_POLICY(SET CMP0003 NEW)
  3. ENDIF(COMMAND cmake_policy)
  4. SET(BUILD_WTWITHQT true)
  5. IF (NOT MULTI_THREADED_BUILD)
  6. SET(BUILD_WTWITHQT false)
  7. ENDIF (NOT MULTI_THREADED_BUILD)
  8. IF (NOT QT_FOUND)
  9. SET(BUILD_WTWITHQT false)
  10. ENDIF (NOT QT_FOUND)
  11. IF (NOT BUILD_WTWITHQT)
  12. MESSAGE(STATUS "** Not building wtwithqt example.")
  13. MESSAGE(STATUS " wtwithqt example requires a Qt4 installation.")
  14. ELSE (NOT BUILD_WTWITHQT)
  15. SUBDIRS(lib)
  16. ADD_DEFINITIONS(-DWT_NO_SLOT_MACROS)
  17. QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/QtObject.h
  18. ${CMAKE_CURRENT_BINARY_DIR}/moccedQtObject.C)
  19. WT_ADD_EXAMPLE(helloqt.wt
  20. hello.C
  21. QtObject.C
  22. ${CMAKE_CURRENT_BINARY_DIR}/moccedQtObject.C
  23. )
  24. TARGET_LINK_LIBRARIES(helloqt.wt
  25. wtwithqt
  26. ${QT_LIBRARIES}
  27. )
  28. #
  29. # If you have Wt installed somehwere, you should use the
  30. # installed Wt header files for your own Wt projects.
  31. # e.g. INCLUDE_DIRECTORIES(/usr/local/wt/include)
  32. # instead of the following:
  33. #
  34. INCLUDE_DIRECTORIES(
  35. ${WT_SOURCE_DIR}/src
  36. ${CMAKE_CURRENT_SOURCE_DIR}/lib
  37. ${QT_QTCORE_INCLUDE_DIR} ${QT_INCLUDE_DIR}
  38. )
  39. ENDIF (NOT BUILD_WTWITHQT)