Log4Qt.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # Log4Qt
  3. #
  4. SET(Log4Qt_DEPENDS)
  5. ctkMacroShouldAddExternalProject(Log4Qt_LIBRARIES add_project)
  6. IF(${add_project})
  7. # Sanity checks
  8. IF(DEFINED Log4Qt_DIR AND NOT EXISTS ${Log4Qt_DIR})
  9. MESSAGE(FATAL_ERROR "Log4Qt_DIR variable is defined but corresponds to non-existing directory")
  10. ENDIF()
  11. SET(proj Log4Qt)
  12. SET(proj_DEPENDENCIES)
  13. SET(Log4Qt_DEPENDS ${proj})
  14. IF(NOT DEFINED Log4Qt_DIR)
  15. # MESSAGE(STATUS "Adding project:${proj}")
  16. ExternalProject_Add(${proj}
  17. GIT_REPOSITORY "${git_protocol}://github.com/commontk/Log4Qt.git"
  18. GIT_TAG "patched"
  19. CMAKE_GENERATOR ${gen}
  20. BUILD_COMMAND ""
  21. CMAKE_ARGS
  22. ${ep_common_args}
  23. -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
  24. DEPENDS
  25. ${proj_DEPENDENCIES}
  26. )
  27. SET(Log4Qt_DIR ${ep_install_dir})
  28. # Since Log4Qt is statically build, there is not need to add its corresponding
  29. # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
  30. ELSE()
  31. ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
  32. ENDIF()
  33. ENDIF()