1 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
5 find_package(Qt4 REQUIRED)
6 # search packages used by KDE
7 find_package(KDE4 REQUIRED)
8 # find_package(Plasma REQUIRED)
9 find_package(X11 REQUIRED)
10 include (KDE4Defaults)
11 include (MacroLibrary)
12 include(MacroOptionalAddSubdirectory)
13 include(MacroOptionalDependPackage)
16 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
19 include(${QT_USE_FILE})
20 message(Qt_Use_file: ${QT_USE_FILE})
22 add_definitions(${QT_DEFINITIONS})
23 add_definitions(-DQT_PLUGIN -DQT_SHARED)
25 include_directories(${CMAKE_SOURCE_DIR}
30 ${CMAKE_SOURCE_DIR}/qtbrowserplugin
34 set(MOZPLUGIN_INSTALL_DIR "C:/Program Files/Mozilla Firefox/plugins")
38 set(MOZPLUGIN_INSTALL_DIR /usr/lib/mozilla/plugins)
41 set(BIN_INSTALL_DIR ${MOZPLUGIN_INSTALL_DIR})
44 ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plasmaplugin.obj
46 -I${CMAKE_CURRENT_SOURCE_DIR}
47 -o ${CMAKE_CURRENT_BINARY_DIR}/plasmaplugin.obj
48 < ${CMAKE_CURRENT_SOURCE_DIR}/src/plasmaplugin.rc
55 qtbrowserplugin/qtbrowserplugin.cpp
61 qtbrowserplugin/qtbrowserplugin_x11.cpp
68 qtbrowserplugin/qtbrowserplugin_win.cpp
69 ${CMAKE_CURRENT_BINARY_DIR}/plasmaplugin.obj
73 set(plasmaplugin_MOC_HDRS
78 SET(plasmaplugindemo_SRCS
82 QT4_WRAP_CPP(plasmaplugin_MOC_SRCS ${plasmaplugin_MOC_HDRS})
84 add_library(plasmaplugin MODULE
86 ${plasmaplugin_MOC_SRCS}
89 add_executable(plasmaplugindemo
91 ${plasmaplugin_MOC_SRCS}
92 ${plasmaplugindemo_SRCS}
96 set_target_properties(plasmaplugin PROPERTIES LINK_FLAGS
97 "-enable-stdcall-fixup -Wl,${CMAKE_SOURCE_DIR}/qtbrowserplugin/qtbrowserplugin.def"
101 target_link_libraries(plasmaplugin
107 target_link_libraries(plasmaplugindemo
113 install(TARGETS plasmaplugin DESTINATION ${MOZPLUGIN_INSTALL_DIR})
114 install(TARGETS plasmaplugindemo DESTINATION ${BIN_INSTALL_DIR})