diff --git a/cmake/modules/KDE4Macros.cmake b/cmake/modules/KDE4Macros.cmake index b2d200e1..04c89a75 100644 --- a/cmake/modules/KDE4Macros.cmake +++ b/cmake/modules/KDE4Macros.cmake @@ -541,6 +541,13 @@ macro (KDE4_ADD_KDEINIT_EXECUTABLE _target_NAME ) kde4_check_executable_params(_SRCS _nogui _test ${ARGN}) + configure_file(${KDE4_MODULE_DIR}/kde4init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp PROPERTIES SKIP_AUTOMOC TRUE) + # under Windows, build a normal executable and additionally a dummy kdeinit4_foo.lib, whose only purpose on windows is to + # keep the linking logic from the CMakeLists.txt on UNIX working (under UNIX all necessary libs are linked against the kdeinit + # library instead against the executable, under windows we want to have everything in the executable, but for compatibility we have to + # keep the library there- + add_library(kdeinit_${_target_NAME} SHARED ${_SRCS}) set_target_properties(kdeinit_${_target_NAME} PROPERTIES OUTPUT_NAME kdeinit4_${_target_NAME})