summaryrefslogtreecommitdiffstats
path: root/klaptopdaemon/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'klaptopdaemon/CMakeLists.txt')
-rw-r--r--klaptopdaemon/CMakeLists.txt35
1 files changed, 17 insertions, 18 deletions
diff --git a/klaptopdaemon/CMakeLists.txt b/klaptopdaemon/CMakeLists.txt
index 2558f04..6ce141b 100644
--- a/klaptopdaemon/CMakeLists.txt
+++ b/klaptopdaemon/CMakeLists.txt
@@ -60,20 +60,18 @@ tde_add_library( kcmlaptop SHARED AUTOMOC
tde_add_kpart( kcm_laptop AUTOMOC
SOURCES battery.cpp main.cpp pcmcia.cpp
power.cpp warning.cpp acpi.cpp sony.cpp
- profile.cpp buttons.cpp apm.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/crcresult.h
+ profile.cpp buttons.cpp apm.cpp
LINK tdeio-shared kcmlaptop-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
+ DEPENDENCIES crcresult-header
)
-# crcresult.h header is included here cause it is
-# generated during build time. Otherwice the
-# dependency on it won't be handeled correctly.
+
##### kded_klaptopdaemon (kpart) ################
tde_add_kpart( kded_klaptopdaemon AUTOMOC
SOURCES laptop_daemon.cpp kpcmcia.cpp
- xautolock.cc kpcmciainfo.cpp daemondock.cpp
+ xautolock.cpp kpcmciainfo.cpp daemondock.cpp
xautolock_diy.c xautolock_engine.c
laptop_daemon.skel
LINK tdeio-shared kcmlaptop-shared
@@ -84,18 +82,19 @@ tde_add_kpart( kded_klaptopdaemon AUTOMOC
##### crcresult.h (header) ######################
-# FIXME: that should potentialy break the cross
-# compilation, If it is possible in
-# generall.
-add_executable( makecrc makecrc.cpp )
-target_link_libraries( makecrc z )
-
-get_target_property( MAKECRC_EXE makecrc LOCATION)
+tde_add_executable( makecrc
+ SOURCES makecrc.cpp
+ LINK z
+)
-add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/crcresult.h
- COMMAND
- ${MAKECRC_EXE} >${CMAKE_CURRENT_BINARY_DIR}/crcresult.h
- DEPENDS makecrc
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+add_custom_command(
+ OUTPUT crcresult.h
+ COMMAND makecrc > crcresult.h
+ DEPENDS makecrc klaptop_acpi_helper
+)
+add_custom_target( crcresult-header
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/crcresult.h
+)