mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Move common definitions in cflags to the main CMakeLists.txt file.
This commit is contained in:
parent
9e1c17f896
commit
435cebb80e
@ -3,10 +3,20 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
######################################################################
|
||||
# Global project name
|
||||
|
||||
project(aseprite)
|
||||
|
||||
######################################################################
|
||||
# Options (these can be specified in cmake command line or modifying CMakeCache.txt)
|
||||
|
||||
option(USE_STATIC_LIBC "Use static version of C and C++ runtimes" off)
|
||||
option(USE_STATIC_ALLEGRO "Use static version of Allegro library" off)
|
||||
|
||||
######################################################################
|
||||
# Directories of third-party libraries
|
||||
|
||||
set(LIBFREETYPE_DIR ${CMAKE_SOURCE_DIR}/third_party/freetype)
|
||||
set(LIBJPEG_DIR ${CMAKE_SOURCE_DIR}/third_party/jpeg)
|
||||
set(LIBPNG_DIR ${CMAKE_SOURCE_DIR}/third_party/libpng)
|
||||
@ -15,8 +25,33 @@ set(TINYXML_DIR ${CMAKE_SOURCE_DIR}/third_party/tinyxml)
|
||||
set(VACA_DIR ${CMAKE_SOURCE_DIR}/third_party/vaca)
|
||||
set(ZLIB_DIR ${CMAKE_SOURCE_DIR}/third_party/zlib)
|
||||
|
||||
# aseprite program
|
||||
######################################################################
|
||||
# Common definitions to compile all sources
|
||||
|
||||
# Vaca is compiled with Allegro
|
||||
add_definitions(-DVACA_ALLEGRO)
|
||||
|
||||
# Do not use MMX optimizations in PNG code
|
||||
add_definitions(-DPNG_NO_MMX_CODE)
|
||||
|
||||
# Debug C/C++ flags
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
add_definitions(-DDEBUGMODE -D_DEBUG)
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
# Use static Allegro library
|
||||
if(USE_STATIC_ALLEGRO)
|
||||
add_definitions(-DALLEGRO_STATICLINK)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# Main ASE targets
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
######################################################################
|
||||
# Third party libraries
|
||||
|
||||
add_subdirectory(third_party)
|
||||
|
@ -267,5 +267,3 @@ if(MSVC)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
endif(MSVC)
|
||||
|
||||
set_target_properties(aseprite PROPERTIES
|
||||
COMPILE_FLAGS "-DVACA_ALLEGRO -DDEBUGMODE -DALLEGRO_STATICLINK")
|
||||
|
3
third_party/vaca/CMakeLists.txt
vendored
3
third_party/vaca/CMakeLists.txt
vendored
@ -18,6 +18,3 @@ add_library(vaca
|
||||
src/Size.cpp
|
||||
src/String.cpp
|
||||
src/Vaca.cpp)
|
||||
|
||||
set_target_properties(vaca PROPERTIES
|
||||
COMPILE_FLAGS "-DVACA_ALLEGRO -DDEBUGMODE -DALLEGRO_STATICLINK")
|
||||
|
Loading…
x
Reference in New Issue
Block a user