Remove -DQT_NO_DEBUG as we want to debug stuff! Also add a bit of kDebug
[plasmaplugin.git] / CMakeLists.txt
blobd6b2ab66ea3b37303646a9e2fdebc258da35c85f
1 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
3 project(plasmaplugin)
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)
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
16 include(${QT_USE_FILE})
17 message(Qt_Use_file: ${QT_USE_FILE})
19 add_definitions(${QT_DEFINITIONS})
20 add_definitions(-DQT_PLUGIN -DQT_SHARED)
22 include_directories(${CMAKE_SOURCE_DIR}
23                     ${CMAKE_BINARY_DIR}
24                     ${X11_INCLUDE_DIR}
25                     ${KDE4_INCLUDES}
26                     ${PLASMA_INCLUDE_DIR}
27                     ${CMAKE_SOURCE_DIR}/qtbrowserplugin
30 set(plasmaplugin_SRCS 
31          src/fullview.cpp
32                  src/pluginwidget.cpp
33                 # src/trivial.cpp
34          qtbrowserplugin/qtbrowserplugin.cpp
35                  qtbrowserplugin/qtbrowserplugin_x11.cpp
38 set(plasmaplugin_MOC_HDRS 
39               src/fullview.h
40                           src/pluginwidget.h
41              #src/trivial.h
44 SET(plasmaplugindemo_SRCS
45         src/main.cpp
48 QT4_WRAP_CPP(plasmaplugin_MOC_SRCS ${plasmaplugin_MOC_HDRS})
50 add_library(plasmaplugin MODULE
51             ${plasmaplugin_SRCS}
52             ${plasmaplugin_MOC_SRCS}
55 add_executable(plasmaplugindemo
56                 ${plasmaplugin_SRCS}
57                 ${plasmaplugin_MOC_SRCS}
58                 ${plasmaplugindemo_SRCS}
61 target_link_libraries(plasmaplugin
62                       ${QT_LIBRARIES}
63                       ${X11_LIBRARIES}
64                       ${PLASMA_LIBS}
65                       ${KDE4_KIO_LIBS})
67 target_link_libraries(plasmaplugindemo
68               ${QT_LIBRARIES}
69                       ${X11_LIBRARIES}
70                       ${PLASMA_LIBS}
71                       ${KDE4_KIO_LIBS})
73 install(TARGETS plasmaplugin DESTINATION /home/george/.mozilla/plugins)
74 install(TARGETS plasmaplugindemo DESTINATION /home/george/.mozilla/plugins)