mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 10:21:04 +00:00
Merge branch 'ci'
This commit is contained in:
commit
f310a51dfb
26
.travis.yml
Normal file
26
.travis.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
language: cpp
|
||||||
|
|
||||||
|
compiler:
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
|
|
||||||
|
env:
|
||||||
|
matrix:
|
||||||
|
- SHARED=OFF
|
||||||
|
- SHARED=ON
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [ "$CXX" = "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- if [ "$SHARED" == "ON" ]; then sudo apt-get install -y libcurl4-openssl-dev libgif-dev libjpeg-dev libz-dev libpng-dev libtinyxml-dev libpixman-1-dev liballegro4.2-dev ; fi
|
||||||
|
- if [ "$CXX" = "g++" ]; then sudo apt-get install -y -qq g++-4.8; fi
|
||||||
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- cmake .. -DUSE_SHARED_CURL=$SHARED -DUSE_SHARED_GIFLIB=$SHARED -DUSE_SHARED_JPEGLIB=$SHARED -DUSE_SHARED_ZLIB=$SHARED -DUSE_SHARED_LIBPNG=$SHARED -DUSE_SHARED_TINYXML=$SHARED -DUSE_SHARED_PIXMAN=$SHARED -DUSE_SHARED_ALLEGRO4=$SHARED
|
||||||
|
|
||||||
|
script:
|
||||||
|
- "make"
|
||||||
|
- "make -k run_non_ui_tests"
|
@ -41,7 +41,6 @@ option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
|
|||||||
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
|
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
|
||||||
option(USE_SHARED_LIBLOADPNG "Use your installed copy of libloadpng" off)
|
option(USE_SHARED_LIBLOADPNG "Use your installed copy of libloadpng" off)
|
||||||
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
|
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
|
||||||
option(USE_SHARED_GTEST "Use your installed copy of gtest" off)
|
|
||||||
option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off)
|
option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off)
|
||||||
option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)
|
option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)
|
||||||
option(USE_ALLEG4_BACKEND "Use Allegro 4 backend" on)
|
option(USE_ALLEG4_BACKEND "Use Allegro 4 backend" on)
|
||||||
@ -113,14 +112,6 @@ set(SIMPLEINI_DIR ${CMAKE_SOURCE_DIR}/third_party/simpleini)
|
|||||||
set(TINYXML_DIR ${CMAKE_SOURCE_DIR}/third_party/tinyxml)
|
set(TINYXML_DIR ${CMAKE_SOURCE_DIR}/third_party/tinyxml)
|
||||||
set(ZLIB_DIR ${CMAKE_SOURCE_DIR}/third_party/zlib)
|
set(ZLIB_DIR ${CMAKE_SOURCE_DIR}/third_party/zlib)
|
||||||
|
|
||||||
# Zlib generated zconf.h file
|
|
||||||
include_directories(${CMAKE_BINARY_DIR}/third_party/zlib)
|
|
||||||
|
|
||||||
# We need private libpng header files so it doesn't matter if we use
|
|
||||||
# the shared version of libpng or not, we need to find header files in
|
|
||||||
# "third_party/libpng"" directory.
|
|
||||||
include_directories(${LIBPNG_DIR})
|
|
||||||
|
|
||||||
# Search in the "cmake" directory for additional CMake modules.
|
# Search in the "cmake" directory for additional CMake modules.
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
@ -128,10 +119,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|||||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Common definitions to compile all sources
|
# Common definitions to compile all sources (app code and third party)
|
||||||
|
|
||||||
# Do not use MMX optimizations in PNG code
|
|
||||||
add_definitions(-DPNG_NO_MMX_CODE)
|
|
||||||
|
|
||||||
# Debug C/C++ flags
|
# Debug C/C++ flags
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
@ -141,16 +129,37 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Fix to compile gtest with VC11 (2012)
|
# Fix to compile gtest with VC11 (2012)
|
||||||
if(NOT USE_SHARED_GTEST)
|
if(MSVC_VERSION EQUAL 1700)
|
||||||
if (MSVC_VERSION EQUAL 1700)
|
add_definitions(-D_VARIADIC_MAX=10)
|
||||||
add_definitions(-D_VARIADIC_MAX=10)
|
endif()
|
||||||
endif()
|
|
||||||
|
if(NOT WIN32 AND NOT APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT USE_SHARED_CURL)
|
if(NOT USE_SHARED_CURL)
|
||||||
set(CURL_STATICLIB ON BOOL)
|
set(CURL_STATICLIB ON BOOL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT USE_SHARED_ZLIB)
|
||||||
|
# Zlib generated zconf.h file
|
||||||
|
include_directories(${CMAKE_BINARY_DIR}/third_party/zlib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(USE_SHARED_LIBPNG)
|
||||||
|
find_package(PNG)
|
||||||
|
if(NOT PNG_FOUND)
|
||||||
|
message(FATAL_ERROR "libpng not found")
|
||||||
|
endif()
|
||||||
|
add_definitions(${PNG_DEFINITIONS})
|
||||||
|
include_directories(${PNG_INCLUDE_DIR})
|
||||||
|
else()
|
||||||
|
include_directories(${LIBPNG_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Do not use MMX optimizations in PNG code
|
||||||
|
add_definitions(-DPNG_NO_MMX_CODE)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Allegro 4 backend
|
# Allegro 4 backend
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Aseprite
|
# Aseprite
|
||||||
*Copyright (C) 2001-2015 David Capello*
|
*Copyright (C) 2001-2015 David Capello*
|
||||||
|
|
||||||
|
[](https://travis-ci.org/aseprite/aseprite)
|
||||||
[](https://gitter.im/aseprite/aseprite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/aseprite/aseprite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
> THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY<br/>
|
> THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY<br/>
|
||||||
|
@ -86,12 +86,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_SHARED_LIBPNG)
|
if(USE_SHARED_LIBPNG)
|
||||||
find_package(PNG)
|
set(libs3rdparty ${libs3rdparty} ${PNG_LIBRARIES})
|
||||||
if(PNG_FOUND)
|
|
||||||
set(libs3rdparty ${libs3rdparty} ${PNG_LIBRARIES})
|
|
||||||
add_definitions(${PNG_DEFINITIONS})
|
|
||||||
include_directories(${PNG_INCLUDE_DIR})
|
|
||||||
endif(PNG_FOUND)
|
|
||||||
else()
|
else()
|
||||||
set(libs3rdparty ${libs3rdparty} libpng)
|
set(libs3rdparty ${libs3rdparty} libpng)
|
||||||
endif()
|
endif()
|
||||||
@ -132,8 +127,8 @@ if(USE_ALLEG4_BACKEND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_SHARED_PIXMAN)
|
if(USE_SHARED_PIXMAN)
|
||||||
find_library(LIBPIXMAN_LIBRARY NAMES pixman)
|
find_library(LIBPIXMAN_LIBRARY NAMES pixman pixman-1)
|
||||||
find_path(LIBPIXMAN_INCLUDE_DIR NAMES pixman.h)
|
find_path(LIBPIXMAN_INCLUDE_DIR NAMES pixman.h PATH_SUFFIXES pixman-1)
|
||||||
|
|
||||||
set(libs3rdparty ${libs3rdparty} ${LIBPIXMAN_LIBRARY})
|
set(libs3rdparty ${libs3rdparty} ${LIBPIXMAN_LIBRARY})
|
||||||
include_directories(${LIBPIXMAN_INCLUDE_DIR})
|
include_directories(${LIBPIXMAN_INCLUDE_DIR})
|
||||||
@ -293,10 +288,8 @@ function(find_tests dir dependencies)
|
|||||||
file(GLOB tests ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*_tests.cpp)
|
file(GLOB tests ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*_tests.cpp)
|
||||||
list(REMOVE_AT ARGV 0)
|
list(REMOVE_AT ARGV 0)
|
||||||
|
|
||||||
if(NOT USE_SHARED_GTEST)
|
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
|
||||||
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
|
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# See if the test is linked with "she" library.
|
# See if the test is linked with "she" library.
|
||||||
list(FIND dependencies she link_with_she)
|
list(FIND dependencies she link_with_she)
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "app/file/file.h"
|
#include "app/file/file.h"
|
||||||
#include "app/file/file_formats_manager.h"
|
#include "app/file/file_formats_manager.h"
|
||||||
#include "doc/doc.h"
|
#include "doc/doc.h"
|
||||||
#include "she/she.h"
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@ -23,7 +22,6 @@ using namespace app;
|
|||||||
|
|
||||||
TEST(File, SeveralSizes)
|
TEST(File, SeveralSizes)
|
||||||
{
|
{
|
||||||
she::ScopedHandle<she::System> system(she::create_system());
|
|
||||||
// Register all possible image formats.
|
// Register all possible image formats.
|
||||||
FileFormatsManager::instance()->registerAllFormats();
|
FileFormatsManager::instance()->registerAllFormats();
|
||||||
std::vector<char> fn(256);
|
std::vector<char> fn(256);
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
|
|
||||||
#include <gif_lib.h>
|
#include <gif_lib.h>
|
||||||
|
|
||||||
|
#if GIFLIB_MAJOR < 5
|
||||||
|
#define GifMakeMapObject MakeMapObject
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace app {
|
namespace app {
|
||||||
|
|
||||||
using namespace base;
|
using namespace base;
|
||||||
@ -106,15 +110,23 @@ static int interlaced_jumps[] = { 8, 8, 4, 2 };
|
|||||||
|
|
||||||
struct GifFilePtr {
|
struct GifFilePtr {
|
||||||
public:
|
public:
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
typedef int (*CloseFunc)(GifFileType*, int*);
|
typedef int (*CloseFunc)(GifFileType*, int*);
|
||||||
|
#else
|
||||||
|
typedef int (*CloseFunc)(GifFileType*);
|
||||||
|
#endif
|
||||||
|
|
||||||
GifFilePtr(GifFileType* ptr, CloseFunc closeFunc) :
|
GifFilePtr(GifFileType* ptr, CloseFunc closeFunc) :
|
||||||
m_ptr(ptr), m_closeFunc(closeFunc) {
|
m_ptr(ptr), m_closeFunc(closeFunc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
~GifFilePtr() {
|
~GifFilePtr() {
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
int errCode;
|
int errCode;
|
||||||
m_closeFunc(m_ptr, &errCode);
|
m_closeFunc(m_ptr, &errCode);
|
||||||
|
#else
|
||||||
|
m_closeFunc(m_ptr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
operator GifFileType*() {
|
operator GifFileType*() {
|
||||||
@ -132,8 +144,14 @@ private:
|
|||||||
|
|
||||||
bool GifFormat::onLoad(FileOp* fop)
|
bool GifFormat::onLoad(FileOp* fop)
|
||||||
{
|
{
|
||||||
int errCode;
|
#if GIFLIB_MAJOR >= 5
|
||||||
GifFilePtr gif_file(DGifOpenFileHandle(open_file_descriptor_with_exception(fop->filename, "rb"), &errCode), &DGifCloseFile);
|
int errCode = 0;
|
||||||
|
#endif
|
||||||
|
GifFilePtr gif_file(DGifOpenFileHandle(open_file_descriptor_with_exception(fop->filename, "rb")
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
|
, &errCode
|
||||||
|
#endif
|
||||||
|
), &DGifCloseFile);
|
||||||
|
|
||||||
if (!gif_file) {
|
if (!gif_file) {
|
||||||
fop_error(fop, "Error loading GIF header.\n");
|
fop_error(fop, "Error loading GIF header.\n");
|
||||||
@ -244,7 +262,13 @@ bool GifFormat::onLoad(FileOp* fop)
|
|||||||
for (int y = 0; y < frame_h; ++y) {
|
for (int y = 0; y < frame_h; ++y) {
|
||||||
addr = frame_image->getPixelAddress(0, y);
|
addr = frame_image->getPixelAddress(0, y);
|
||||||
if (DGifGetLine(gif_file, addr, frame_w) == GIF_ERROR)
|
if (DGifGetLine(gif_file, addr, frame_w) == GIF_ERROR)
|
||||||
throw Exception("Invalid image data (%d).\n", gif_file->Error);
|
throw Exception("Invalid image data (%d).\n"
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
|
, gif_file->Error
|
||||||
|
#else
|
||||||
|
, GifLastError()
|
||||||
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,8 +546,14 @@ void GifFormat::onDestroyData(FileOp* fop)
|
|||||||
#ifdef ENABLE_SAVE
|
#ifdef ENABLE_SAVE
|
||||||
bool GifFormat::onSave(FileOp* fop)
|
bool GifFormat::onSave(FileOp* fop)
|
||||||
{
|
{
|
||||||
int errCode;
|
#if GIFLIB_MAJOR >= 5
|
||||||
GifFilePtr gif_file(EGifOpenFileHandle(open_file_descriptor_with_exception(fop->filename, "wb"), &errCode), &EGifCloseFile);
|
int errCode = 0;
|
||||||
|
#endif
|
||||||
|
GifFilePtr gif_file(EGifOpenFileHandle(open_file_descriptor_with_exception(fop->filename, "wb")
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
|
, &errCode
|
||||||
|
#endif
|
||||||
|
), &EGifCloseFile);
|
||||||
|
|
||||||
if (!gif_file)
|
if (!gif_file)
|
||||||
throw Exception("Error creating GIF file.\n");
|
throw Exception("Error creating GIF file.\n");
|
||||||
@ -682,6 +712,7 @@ bool GifFormat::onSave(FileOp* fop)
|
|||||||
|
|
||||||
// Specify loop extension.
|
// Specify loop extension.
|
||||||
if (frame_num == 0 && loop >= 0) {
|
if (frame_num == 0 && loop >= 0) {
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
if (EGifPutExtensionLeader(gif_file, APPLICATION_EXT_FUNC_CODE) == GIF_ERROR)
|
if (EGifPutExtensionLeader(gif_file, APPLICATION_EXT_FUNC_CODE) == GIF_ERROR)
|
||||||
throw Exception("Error writing GIF graphics extension record (header section).");
|
throw Exception("Error writing GIF graphics extension record (header section).");
|
||||||
|
|
||||||
@ -698,6 +729,23 @@ bool GifFormat::onSave(FileOp* fop)
|
|||||||
|
|
||||||
if (EGifPutExtensionTrailer(gif_file) == GIF_ERROR)
|
if (EGifPutExtensionTrailer(gif_file) == GIF_ERROR)
|
||||||
throw Exception("Error writing GIF graphics extension record (trailer section).");
|
throw Exception("Error writing GIF graphics extension record (trailer section).");
|
||||||
|
|
||||||
|
#else
|
||||||
|
unsigned char extension_bytes[11];
|
||||||
|
|
||||||
|
memcpy(extension_bytes, "NETSCAPE2.0", 11);
|
||||||
|
if (EGifPutExtensionFirst(gif_file, APPLICATION_EXT_FUNC_CODE, 11, extension_bytes) == GIF_ERROR)
|
||||||
|
throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num);
|
||||||
|
|
||||||
|
extension_bytes[0] = 1;
|
||||||
|
extension_bytes[1] = (loop & 0xff);
|
||||||
|
extension_bytes[2] = (loop >> 8) & 0xff;
|
||||||
|
if (EGifPutExtensionNext(gif_file, APPLICATION_EXT_FUNC_CODE, 3, extension_bytes) == GIF_ERROR)
|
||||||
|
throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num);
|
||||||
|
|
||||||
|
if (EGifPutExtensionLast(gif_file, APPLICATION_EXT_FUNC_CODE, 0, NULL) == GIF_ERROR)
|
||||||
|
throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write graphics extension record (to save the duration of the
|
// Write graphics extension record (to save the duration of the
|
||||||
@ -770,8 +818,8 @@ bool GifFormat::onSave(FileOp* fop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
base::SharedPtr<FormatOptions> GifFormat::onGetFormatOptions(FileOp* fop)
|
base::SharedPtr<FormatOptions> GifFormat::onGetFormatOptions(FileOp* fop)
|
||||||
{
|
{
|
||||||
|
@ -14,20 +14,17 @@
|
|||||||
#include "app/file/gif_options.h"
|
#include "app/file/gif_options.h"
|
||||||
#include "doc/doc.h"
|
#include "doc/doc.h"
|
||||||
#include "doc/test_context.h"
|
#include "doc/test_context.h"
|
||||||
#include "she/scoped_handle.h"
|
|
||||||
#include "she/system.h"
|
|
||||||
|
|
||||||
using namespace app;
|
using namespace app;
|
||||||
|
|
||||||
class GifFormat : public ::testing::Test {
|
class GifFormat : public ::testing::Test {
|
||||||
public:
|
public:
|
||||||
GifFormat() : m_system(she::create_system()) {
|
GifFormat() {
|
||||||
FileFormatsManager::instance()->registerAllFormats();
|
FileFormatsManager::instance()->registerAllFormats();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
doc::TestContextT<app::Context> m_ctx;
|
doc::TestContextT<app::Context> m_ctx;
|
||||||
she::ScopedHandle<she::System> m_system;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(GifFormat, Dimensions)
|
TEST_F(GifFormat, Dimensions)
|
||||||
|
@ -404,7 +404,7 @@ bool PngFormat::onSave(FileOp* fop)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Save the color palette.
|
// Save the color palette.
|
||||||
palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
|
palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH * sizeof(png_color));
|
||||||
for (c = 0; c < PNG_MAX_PALETTE_LENGTH; c++) {
|
for (c = 0; c < PNG_MAX_PALETTE_LENGTH; c++) {
|
||||||
fop_sequence_get_color(fop, c, &r, &g, &b);
|
fop_sequence_get_color(fop, c, &r, &g, &b);
|
||||||
palette[c].red = r;
|
palette[c].red = r;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "she/she.h"
|
#include "she/she.h"
|
||||||
|
|
||||||
#include "base/concurrent_queue.h"
|
#include "base/concurrent_queue.h"
|
||||||
|
#include "base/exception.h"
|
||||||
#include "base/string.h"
|
#include "base/string.h"
|
||||||
#include "base/unique_ptr.h"
|
#include "base/unique_ptr.h"
|
||||||
#include "she/alleg4/surface.h"
|
#include "she/alleg4/surface.h"
|
||||||
@ -679,10 +680,12 @@ public:
|
|||||||
Alleg4System()
|
Alleg4System()
|
||||||
{
|
{
|
||||||
if (allegro_init() < 0)
|
if (allegro_init() < 0)
|
||||||
throw std::runtime_error("Cannot initialize Allegro library");
|
throw base::Exception("Cannot initialize Allegro library: %s", allegro_error);
|
||||||
|
|
||||||
set_uformat(U_UTF8);
|
set_uformat(U_UTF8);
|
||||||
|
#if MAKE_VERSION(ALLEGRO_VERSION, ALLEGRO_SUB_VERSION, ALLEGRO_WIP_VERSION) >= MAKE_VERSION(4, 4, 0)
|
||||||
_al_detect_filename_encoding();
|
_al_detect_filename_encoding();
|
||||||
|
#endif
|
||||||
install_timer();
|
install_timer();
|
||||||
|
|
||||||
// Register PNG as a supported bitmap type
|
// Register PNG as a supported bitmap type
|
||||||
|
13
third_party/CMakeLists.txt
vendored
13
third_party/CMakeLists.txt
vendored
@ -1,8 +1,6 @@
|
|||||||
# ASEPRITE
|
# ASEPRITE
|
||||||
# Copyright (C) 2001-2015 David Capello
|
# Copyright (C) 2001-2015 David Capello
|
||||||
|
|
||||||
include(CheckCXXSourceCompiles)
|
|
||||||
|
|
||||||
include_directories(.)
|
include_directories(.)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
@ -30,20 +28,13 @@ if(NOT USE_SHARED_TINYXML)
|
|||||||
add_subdirectory(tinyxml)
|
add_subdirectory(tinyxml)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT USE_SHARED_GTEST AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
|
||||||
# We don't use add_subdirectory(gtest) because the gtest
|
# We don't use add_subdirectory(gtest) because the gtest
|
||||||
# CMakeLists.txt modifies some MSVC flags.
|
# CMakeLists.txt modifies some MSVC flags.
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/gtest ${CMAKE_CURRENT_SOURCE_DIR}/gtest/include)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/gtest ${CMAKE_CURRENT_SOURCE_DIR}/gtest/include)
|
||||||
add_library(gtest ${CMAKE_CURRENT_SOURCE_DIR}/gtest/src/gtest-all.cc)
|
add_library(gtest ${CMAKE_CURRENT_SOURCE_DIR}/gtest/src/gtest-all.cc)
|
||||||
else()
|
else()
|
||||||
find_library(gtest)
|
message(FATAL_ERROR "gtest/gtest.h is missing. Initialize submodules: git submodule update --init --recursive")
|
||||||
check_cxx_source_compiles("
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
int main() { }
|
|
||||||
" HAVE_GTEST_GTEST_H)
|
|
||||||
if(NOT HAVE_GTEST_GTEST_H)
|
|
||||||
message(FATAL_ERROR "gtest/gtest.h is missing. Set USE_SHARED_GTEST=OFF and initialize submodules: git submodule update --init --recursive")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT USE_SHARED_CURL)
|
if(NOT USE_SHARED_CURL)
|
||||||
|
5
third_party/loadpng/CMakeLists.txt
vendored
5
third_party/loadpng/CMakeLists.txt
vendored
@ -1,10 +1,7 @@
|
|||||||
# ASEPRITE
|
# ASEPRITE
|
||||||
# Copyright (C) 2001-2013 David Capello
|
# Copyright (C) 2001-2013, 2015 David Capello
|
||||||
|
|
||||||
add_library(loadpng
|
add_library(loadpng
|
||||||
loadpng.c
|
loadpng.c
|
||||||
savepng.c
|
savepng.c
|
||||||
regpng.c)
|
regpng.c)
|
||||||
|
|
||||||
set_target_properties(loadpng PROPERTIES
|
|
||||||
COMPILE_FLAGS "-DDEBUGMODE -DALLEGRO_STATICLINK")
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user