Add Cairo (and, transitively, Pixman) dependencies.
parent
8960ee365a
commit
6963c7e25b
|
@ -11,3 +11,9 @@
|
||||||
[submodule "extlib/libdxfrw"]
|
[submodule "extlib/libdxfrw"]
|
||||||
path = extlib/libdxfrw
|
path = extlib/libdxfrw
|
||||||
url = https://github.com/solvespace/libdxfrw.git
|
url = https://github.com/solvespace/libdxfrw.git
|
||||||
|
[submodule "extlib/pixman"]
|
||||||
|
path = extlib/pixman
|
||||||
|
url = https://github.com/solvespace/pixman
|
||||||
|
[submodule "extlib/cairo"]
|
||||||
|
path = extlib/cairo
|
||||||
|
url = https://github.com/solvespace/cairo
|
||||||
|
|
|
@ -4,5 +4,5 @@ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -q -y \
|
sudo apt-get install -q -y \
|
||||||
cmake cmake-data libpng12-dev zlib1g-dev libjson0-dev libfontconfig1-dev \
|
cmake cmake-data libpng12-dev zlib1g-dev libjson0-dev libfontconfig1-dev \
|
||||||
libgtkmm-2.4-dev libpangomm-1.4-dev libgl1-mesa-dev libglu-dev \
|
libgtkmm-2.4-dev libpangomm-1.4-dev libcairo2-dev libgl1-mesa-dev libglu-dev \
|
||||||
libfreetype6-dev dpkg-dev gcc-5 g++-5
|
libfreetype6-dev dpkg-dev gcc-5 g++-5
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
|
|
||||||
brew update
|
brew update
|
||||||
brew upgrade cmake libpng
|
brew upgrade cmake libpng
|
||||||
|
brew install freetype cairo
|
||||||
|
|
|
@ -72,6 +72,7 @@ add_subdirectory(extlib/libdxfrw)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
include(FindVendoredPackage)
|
include(FindVendoredPackage)
|
||||||
|
include(AddVendoredSubdirectory)
|
||||||
|
|
||||||
find_vendored_package(Freetype freetype
|
find_vendored_package(Freetype freetype
|
||||||
WITH_ZLIB OFF
|
WITH_ZLIB OFF
|
||||||
|
@ -92,6 +93,20 @@ if(WIN32)
|
||||||
PNG_PNG_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/libpng)
|
PNG_PNG_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/libpng)
|
||||||
list(APPEND PNG_PNG_INCLUDE_DIR ${CMAKE_BINARY_DIR}/extlib/libpng)
|
list(APPEND PNG_PNG_INCLUDE_DIR ${CMAKE_BINARY_DIR}/extlib/libpng)
|
||||||
|
|
||||||
|
message(STATUS "Using in-tree pixman")
|
||||||
|
add_vendored_subdirectory(extlib/pixman)
|
||||||
|
set(PIXMAN_FOUND YES)
|
||||||
|
set(PIXMAN_LIBRARY pixman)
|
||||||
|
set(PIXMAN_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/pixman/pixman)
|
||||||
|
list(APPEND PIXMAN_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/pixman/pixman)
|
||||||
|
|
||||||
|
message(STATUS "Using in-tree cairo")
|
||||||
|
add_vendored_subdirectory(extlib/cairo)
|
||||||
|
set(CAIRO_FOUND YES)
|
||||||
|
set(CAIRO_LIBRARY cairo)
|
||||||
|
set(CAIRO_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/cairo/src)
|
||||||
|
list(APPEND CAIRO_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/cairo/src)
|
||||||
|
|
||||||
if(NOT MINGW)
|
if(NOT MINGW)
|
||||||
message(STATUS "Using prebuilt SpaceWare")
|
message(STATUS "Using prebuilt SpaceWare")
|
||||||
set(SPACEWARE_FOUND TRUE)
|
set(SPACEWARE_FOUND TRUE)
|
||||||
|
@ -108,6 +123,8 @@ elseif(APPLE)
|
||||||
find_package(Freetype REQUIRED)
|
find_package(Freetype REQUIRED)
|
||||||
|
|
||||||
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
||||||
|
find_library(CAIRO_LIBRARY cairo REQUIRED)
|
||||||
|
find_path(CAIRO_INCLUDE_DIRS cairo.h PATH_SUFFIXES cairo)
|
||||||
else() # Linux and compatible systems
|
else() # Linux and compatible systems
|
||||||
find_package(Backtrace)
|
find_package(Backtrace)
|
||||||
find_package(SpaceWare)
|
find_package(SpaceWare)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Equivalent to add_subdirectory(... EXCLUDE_FROM_ALL), but also disables
|
||||||
|
# all warnings.
|
||||||
|
|
||||||
|
include(DisableWarnings)
|
||||||
|
|
||||||
|
function(add_vendored_subdirectory PATH)
|
||||||
|
disable_warnings()
|
||||||
|
|
||||||
|
add_subdirectory(${PATH} EXCLUDE_FROM_ALL)
|
||||||
|
endfunction()
|
|
@ -3,7 +3,7 @@ Section: graphics
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: whitequark <whitequark@whitequark.org>
|
Maintainer: whitequark <whitequark@whitequark.org>
|
||||||
Build-Depends: debhelper (>= 9), cmake, libpng-dev, zlib1g-dev, libjson-c-dev,
|
Build-Depends: debhelper (>= 9), cmake, libpng-dev, zlib1g-dev, libjson-c-dev,
|
||||||
libfontconfig1-dev, libgtkmm-2.4-dev, libpangomm-1.4-dev,
|
libfontconfig1-dev, libgtkmm-2.4-dev, libpangomm-1.4-dev, libcairo2-dev,
|
||||||
libgl-dev, libglu-dev
|
libgl-dev, libglu-dev
|
||||||
Standards-Version: 3.9.5
|
Standards-Version: 3.9.5
|
||||||
Homepage: http://solvespace.com
|
Homepage: http://solvespace.com
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d4724ee921c4fa399ccbd0019c3d6917452e0ffd
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 54eee47843a147336c594b3213993b439fdf67ed
|
|
@ -62,7 +62,8 @@ include_directories(
|
||||||
${OPENGL_INCLUDE_DIR}
|
${OPENGL_INCLUDE_DIR}
|
||||||
${ZLIB_INCLUDE_DIR}
|
${ZLIB_INCLUDE_DIR}
|
||||||
${PNG_PNG_INCLUDE_DIR}
|
${PNG_PNG_INCLUDE_DIR}
|
||||||
${FREETYPE_INCLUDE_DIRS})
|
${FREETYPE_INCLUDE_DIRS}
|
||||||
|
${CAIRO_INCLUDE_DIRS})
|
||||||
|
|
||||||
if(SPACEWARE_FOUND)
|
if(SPACEWARE_FOUND)
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -186,6 +187,7 @@ target_link_libraries(solvespace
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
${PNG_LIBRARY}
|
${PNG_LIBRARY}
|
||||||
${FREETYPE_LIBRARY}
|
${FREETYPE_LIBRARY}
|
||||||
|
${CAIRO_LIBRARY}
|
||||||
${platform_LIBRARIES})
|
${platform_LIBRARIES})
|
||||||
|
|
||||||
if(WIN32 AND NOT MINGW)
|
if(WIN32 AND NOT MINGW)
|
||||||
|
|
Loading…
Reference in New Issue