3 find_package(Qt5Core REQUIRED)
4 find_package(Qt5Network REQUIRED)
5 find_package(Qt5Script REQUIRED)
7 message(STATUS "using Qt5")
9 set(QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Script_INCLUDE_DIRS})
10 set(QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Script_LIBRARIES})
11 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
12 message(STATUS "size of void_p: ${CMAKE_SIZEOF_VOID_P}")
13 if(CMAKE_SIZEOF_VOID_P MATCHES "8")
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large")
15 endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
16 add_definitions(${Qt5Core_DEFINITIONS})
21 set(communi_INCLUDE_DIRS /usr/include/qt5/Communi)
22 set(communi_LIBRARIES -lCommuni)
23 add_definitions(-DCOMMUNI_SHARED)
25 include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${communi_INCLUDE_DIRS} ${QT_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/plugins/common)
27 set(bluemonkeyplugin_headers bluemonkey.h irccoms.h authenticate.h agent.h)
28 set(bluemonkeyplugin_sources bluemonkey.cpp irccoms.cpp authenticate.cpp agent.cpp)
30 add_library(bluemonkeyplugin MODULE ${bluemonkeyplugin_sources})
31 set_target_properties(bluemonkeyplugin PROPERTIES PREFIX "")
32 target_link_libraries(bluemonkeyplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${QT_LIBRARIES} ${communi_LIBRARIES} amb-plugins-common -L${CMAKE_CURRENT_BINARY_DIR}/plugins/common)
34 set(config_files ${CMAKE_CURRENT_SOURCE_DIR}/ircSettings.js
35 ${CMAKE_CURRENT_SOURCE_DIR}/authSettings.js
36 ${CMAKE_CURRENT_SOURCE_DIR}/config.js)
38 install(TARGETS bluemonkeyplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
39 install (FILES ${config_files} DESTINATION /etc/ambd/bluemonkey)
40 endif(bluemonkey_plugin)