Nun wollte ich auf Basis des Beispiel CMakeLists.txt Files diese Lib dazulinken. Aber ich bekomme leider einen nervigen Feher:
Code: Alles auswählen
CMakeFiles/plasma_applet_tutorial1.dir/PopUp.o: In function `DimmerPopUp::sl_dispValue(int)':
/home/Xerces/devel/dimmer_applet/PopUp.cpp:57: undefined reference to `sd_set_level(int)'
collect2: ld returned 1 exit status
Code: Alles auswählen
# Project Needs a name ofcourse
project(plasma-tutorial1)
add_subdirectory (smartdimmer_lib) <= NEU
LINK_LIBRARIES(libsmartdimmer.a) <=NEU
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
find_package(Plasma REQUIRED)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
)
# We add our source code here
set(tutorial1_SRCS plasma-tutorial1.cpp PopUp.cpp)
# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_tutorial1 ${tutorial1_SRCS})
target_link_libraries(plasma_applet_tutorial1
${PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
install(TARGETS plasma_applet_tutorial1
DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-applet-tutorial1.desktop
DESTINATION ${SERVICES_INSTALL_DIR})