make the def handling simpler with cmake, we don't need to specify the library name...
authorRomain Pokrzywka <romain@kdab.com>
Sat, 30 Jan 2010 01:49:37 +0000 (17:49 -0800)
committerRalf Habacker <ralf.habacker@freenet.de>
Sat, 6 Feb 2010 23:32:36 +0000 (00:32 +0100)
cmake/dbus/CMakeLists.txt

index 16166ca..2eff13e 100644 (file)
@@ -270,15 +270,13 @@ if(splitlib AND MSVC)
        endif(MSVC_IDE)
 else(splitlib AND MSVC)
        # all code into one library
+       if(MSVC)
+               list(APPEND libdbus_SOURCES ${DBUS_DIR}/dbus-1.def)
+       endif(MSVC)
+       
        add_library(dbus-1 ${DBUS_LIB_TYPE} ${libdbus_SOURCES} ${libdbus_HEADERS} )
        target_link_libraries(dbus-1 ${LIBS})
        
-       if(MSVC)
-               set_target_properties(dbus-1  PROPERTIES LINK_FLAGS_RELWITHDEBINFO /def:"${DBUS_DIR}/dbus-1.def.cmake")
-               set_target_properties(dbus-1  PROPERTIES LINK_FLAGS_RELEASE /def:"${DBUS_DIR}/dbus-1.def.cmake")
-               set_target_properties(dbus-1  PROPERTIES LINK_FLAGS_MINSIZEREL /def:"${DBUS_DIR}/dbus-1.def.cmake")
-               set_target_properties(dbus-1  PROPERTIES LINK_FLAGS_DEBUG /def:"${DBUS_DIR}/dbus-1.def.cmake")
-       endif(MSVC)
        if(MSVC_IDE)    
                project_source_group(${GROUP_CODE} libdbus_SOURCES libdbus_HEADERS)
        endif(MSVC_IDE)