diff --git a/kdesu/CMakeLists.txt b/kdesu/CMakeLists.txt index c4f1eaf980..7f639ab65d 100644 --- a/kdesu/CMakeLists.txt +++ b/kdesu/CMakeLists.txt @@ -1,60 +1,61 @@ project(kdesu) include_directories( ${KDE4_KPTY_INCLUDES} ) check_function_exists(setpriority HAVE_SETPRIORITY) check_function_exists(getpeereid HAVE_GETPEEREID) set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) check_type_size("struct ucred" STRUCT_UCRED) #defines HAVE_STRUCT_UCRED (bool) and STRUCT_UCRED (size, unused) set(CMAKE_EXTRA_INCLUDE_FILES) #reset CMAKE_EXTRA_INCLUDE_FILES configure_file(config-kdesu.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdesu.h ) ########### next target ############### set(kdesu_LIB_SRCS client.cpp process.cpp kcookie.cpp su.cpp ssh.cpp stub.cpp ) kde4_add_library(kdesu ${LIBRARY_TYPE} ${kdesu_LIB_SRCS}) +generate_export_header(kdesu) target_link_libraries(kdesu ${KDE4_KPTY_LIBS} ) target_link_libraries(kdesu LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY} ) if(KDESU_USE_SUDO_DEFAULT) set_source_files_properties(su.cpp PROPERTIES COMPILE_FLAGS -DKDESU_USE_SUDO_DEFAULT) endif(KDESU_USE_SUDO_DEFAULT) set_target_properties(kdesu PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION} SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION} ) install(TARGETS kdesu ${INSTALL_TARGETS_DEFAULT_ARGS} ) ########### next target ############### set(kdesu_stub_SRCS kdesu_stub.c ) kde4_add_executable(kdesu_stub NOGUI ${kdesu_stub_SRCS}) install(TARGETS kdesu_stub DESTINATION ${LIBEXEC_INSTALL_DIR} ) ########### install files ############### -install( FILES kdesu_export.h client.h process.h su.h ssh.h stub.h defaults.h +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kdesu_export.h client.h process.h su.h ssh.h stub.h defaults.h DESTINATION ${INCLUDE_INSTALL_DIR}/kdesu COMPONENT Devel) diff --git a/kdesu/kdesu_export.h b/kdesu/kdesu_export.h deleted file mode 100644 index eb75511a0c..0000000000 --- a/kdesu/kdesu_export.h +++ /dev/null @@ -1,39 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KDESU_EXPORT_H -#define KDESU_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDESU_EXPORT -# if defined(KDELIBS_STATIC_LIBS) - /* No export/import for static libraries */ -# define KDESU_EXPORT -# elif defined(MAKE_KDESU_LIB) - /* We are building this library */ -# define KDESU_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDESU_EXPORT KDE_IMPORT -# endif -#endif - -#endif