forked from mapeditor/tiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced libtiledquick (mapeditor#2867)
This moves the C++ types out of tiledquickplugin into a standalone library so that other projects can link to them.
- Loading branch information
1 parent
390f383
commit 1d005ed
Showing
13 changed files
with
126 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import qbs 1.0 | ||
|
||
DynamicLibrary { | ||
targetName: "tiledquick" | ||
|
||
Depends { name: "libtiled" } | ||
Depends { name: "cpp" } | ||
Depends { name: "Qt"; submodules: ["quick"]; versionAtLeast: "5.6" } | ||
|
||
cpp.cxxLanguageVersion: "c++14" | ||
cpp.visibility: "minimal" | ||
cpp.defines: [ | ||
"TILED_QUICK_LIBRARY", | ||
"QT_NO_CAST_FROM_ASCII", | ||
"QT_NO_CAST_TO_ASCII", | ||
"QT_NO_URL_CAST_FROM_STRING", | ||
"QT_DEPRECATED_WARNINGS", | ||
"QT_DISABLE_DEPRECATED_BEFORE=0x050900", | ||
"QT_NO_FOREACH" | ||
] | ||
|
||
Properties { | ||
condition: qbs.targetOS.contains("macos") | ||
cpp.cxxFlags: ["-Wno-unknown-pragmas"] | ||
} | ||
|
||
Properties { | ||
condition: qbs.targetOS.contains("darwin") | ||
bundle.isBundle: false | ||
cpp.sonamePrefix: "@rpath" | ||
} | ||
|
||
files: [ | ||
"mapitem.h", | ||
"mapitem.cpp", | ||
"maploader.h", | ||
"maploader.cpp", | ||
"mapref.h", | ||
"tilelayeritem.h", | ||
"tilelayeritem.cpp", | ||
"tiledquick_global.h", | ||
"tilesnode.h", | ||
"tilesnode.cpp" | ||
] | ||
|
||
Group { | ||
condition: project.installHeaders | ||
qbs.install: true | ||
qbs.installDir: "include/tiledquick" | ||
fileTagsFilter: "hpp" | ||
} | ||
|
||
Export { | ||
Depends { name: "cpp" } | ||
Depends { | ||
name: "Qt" | ||
submodules: ["quick"] | ||
} | ||
|
||
cpp.includePaths: "." | ||
} | ||
|
||
Group { | ||
condition: !qbs.targetOS.contains("darwin") | ||
qbs.install: true | ||
qbs.installDir: { | ||
if (qbs.targetOS.contains("windows")) | ||
return "" | ||
else | ||
return "lib" | ||
} | ||
fileTagsFilter: "dynamiclibrary" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* tiledquick_global.h | ||
* Copyright 2020, Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | ||
* | ||
* This file is part of libtiledquick. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR | ||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
* EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <QtCore/qglobal.h> | ||
|
||
#if defined(TILED_QUICK_LIBRARY) | ||
# define TILEDQUICK_SHARED_EXPORT Q_DECL_EXPORT | ||
#else | ||
# define TILEDQUICK_SHARED_EXPORT Q_DECL_IMPORT | ||
#endif |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters