CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728
  1. project(Automoc4)
  2. cmake_minimum_required(VERSION 2.4.5 FATAL_ERROR)
  3. find_package(Qt4 REQUIRED)
  4. if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER MATCHES "icc")
  5. set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common")
  6. endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER MATCHES "icc")
  7. # set the current version number
  8. include(Automoc4Version.cmake)
  9. configure_file(automoc4_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/automoc4_config.h)
  10. # Always include srcdir and builddir in include path
  11. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  12. include_directories(${QT_INCLUDE_DIR})
  13. add_executable(automoc4 kde4automoc.cpp)
  14. set_target_properties(automoc4 PROPERTIES SKIP_BUILD_RPATH FALSE
  15. INSTALL_RPATH_USE_LINK_PATH TRUE )
  16. target_link_libraries(automoc4 ${QT_QTCORE_LIBRARY})
  17. install(TARGETS automoc4 DESTINATION bin)
  18. install(FILES Automoc4Config.cmake Automoc4Version.cmake automoc4.files.in DESTINATION lib${LIB_SUFFIX}/automoc4)