mirror of https://github.com/cutefishos/calamares
				
				
				
			Merge branch 'crush-dllmacros'
Tidy a bunch of includes, make it easier to add tests.main
						commit
						0238a7338a
					
				@ -0,0 +1,58 @@
 | 
			
		||||
# === This file is part of Calamares - <https://github.com/calamares> ===
 | 
			
		||||
#
 | 
			
		||||
#   Calamares is free software: you can redistribute it and/or modify
 | 
			
		||||
#   it under the terms of the GNU General Public License as published by
 | 
			
		||||
#   the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
#   (at your option) any later version.
 | 
			
		||||
#
 | 
			
		||||
#   Calamares 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 General Public License for more details.
 | 
			
		||||
#
 | 
			
		||||
#   You should have received a copy of the GNU General Public License
 | 
			
		||||
#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
#
 | 
			
		||||
#   SPDX-License-Identifier: GPL-3.0+
 | 
			
		||||
#   License-Filename: LICENSE
 | 
			
		||||
#
 | 
			
		||||
###
 | 
			
		||||
#
 | 
			
		||||
# Support functions for building Calamares tests.
 | 
			
		||||
# This extends KDE's ECM tests with some custom patterns.
 | 
			
		||||
#
 | 
			
		||||
# calamares_add_test(
 | 
			
		||||
#   <NAME>
 | 
			
		||||
#   [GUI]
 | 
			
		||||
#   SOURCES <FILE..>
 | 
			
		||||
#   )
 | 
			
		||||
 | 
			
		||||
include( CMakeParseArguments )
 | 
			
		||||
include( CalamaresAutomoc )
 | 
			
		||||
 | 
			
		||||
function( calamares_add_test )
 | 
			
		||||
    # parse arguments (name needs to be saved before passing ARGN into the macro)
 | 
			
		||||
    set( NAME ${ARGV0} )
 | 
			
		||||
    set( options GUI )
 | 
			
		||||
    set( multiValueArgs SOURCES LIBRARIES )
 | 
			
		||||
    cmake_parse_arguments( TEST "${options}" "" "${multiValueArgs}" ${ARGN} )
 | 
			
		||||
    set( TEST_NAME ${NAME} )
 | 
			
		||||
 | 
			
		||||
    if( ECM_FOUND AND BUILD_TESTING )
 | 
			
		||||
        ecm_add_test(
 | 
			
		||||
            ${TEST_SOURCES}
 | 
			
		||||
            TEST_NAME
 | 
			
		||||
                ${TEST_NAME}
 | 
			
		||||
            LINK_LIBRARIES
 | 
			
		||||
                calamares
 | 
			
		||||
                ${TEST_LIBRARIES}
 | 
			
		||||
                Qt5::Core
 | 
			
		||||
                Qt5::Test
 | 
			
		||||
            )
 | 
			
		||||
        calamares_automoc( ${TEST_NAME} )
 | 
			
		||||
        target_compile_definitions( ${TEST_NAME} PRIVATE -DBUILD_AS_TEST )
 | 
			
		||||
        if( TEST_GUI )
 | 
			
		||||
            target_link_libraries( ${TEST_NAME} calamaresui Qt5::Gui )
 | 
			
		||||
        endif()
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
@ -1,32 +0,0 @@
 | 
			
		||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
 | 
			
		||||
 *
 | 
			
		||||
 *   Copyright 2014, Teo Mrnjavac <teo@kde.org>
 | 
			
		||||
 *
 | 
			
		||||
 *   Calamares is free software: you can redistribute it and/or modify
 | 
			
		||||
 *   it under the terms of the GNU General Public License as published by
 | 
			
		||||
 *   the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
 *   (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 *   Calamares 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 General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 *   You should have received a copy of the GNU General Public License
 | 
			
		||||
 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef PLUGINDLLMACRO_H
 | 
			
		||||
#define PLUGINDLLMACRO_H
 | 
			
		||||
 | 
			
		||||
#include <QtCore/qglobal.h>
 | 
			
		||||
 | 
			
		||||
#ifndef PLUGINDLLEXPORT
 | 
			
		||||
#if defined( PLUGINDLLEXPORT_PRO )
 | 
			
		||||
#define PLUGINDLLEXPORT Q_DECL_EXPORT
 | 
			
		||||
#else
 | 
			
		||||
#define PLUGINDLLEXPORT Q_DECL_IMPORT
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@ -1,32 +0,0 @@
 | 
			
		||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
 | 
			
		||||
 *
 | 
			
		||||
 *   Copyright 2014, Teo Mrnjavac <teo@kde.org>
 | 
			
		||||
 *
 | 
			
		||||
 *   Calamares is free software: you can redistribute it and/or modify
 | 
			
		||||
 *   it under the terms of the GNU General Public License as published by
 | 
			
		||||
 *   the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
 *   (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 *   Calamares 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 General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 *   You should have received a copy of the GNU General Public License
 | 
			
		||||
 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef UIDLLMACRO_H
 | 
			
		||||
#define UIDLLMACRO_H
 | 
			
		||||
 | 
			
		||||
#include <QtCore/qglobal.h>
 | 
			
		||||
 | 
			
		||||
#ifndef UIDLLEXPORT
 | 
			
		||||
#if defined( UIDLLEXPORT_PRO )
 | 
			
		||||
#define UIDLLEXPORT Q_DECL_EXPORT
 | 
			
		||||
#else
 | 
			
		||||
#define UIDLLEXPORT Q_DECL_IMPORT
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue