CMake: Cairo is required for CLI, not just tests.
parent
3858cbe249
commit
6989a3d068
|
@ -140,21 +140,19 @@ if(WIN32)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
message(STATUS "Using in-tree pixman")
|
||||||
message(STATUS "Using in-tree pixman")
|
add_vendored_subdirectory(extlib/pixman)
|
||||||
add_vendored_subdirectory(extlib/pixman)
|
set(PIXMAN_FOUND YES)
|
||||||
set(PIXMAN_FOUND YES)
|
set(PIXMAN_LIBRARY pixman)
|
||||||
set(PIXMAN_LIBRARY pixman)
|
set(PIXMAN_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/pixman/pixman)
|
||||||
set(PIXMAN_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/pixman/pixman)
|
list(APPEND PIXMAN_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/pixman/pixman)
|
||||||
list(APPEND PIXMAN_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/pixman/pixman)
|
|
||||||
|
|
||||||
message(STATUS "Using in-tree cairo")
|
message(STATUS "Using in-tree cairo")
|
||||||
add_vendored_subdirectory(extlib/cairo)
|
add_vendored_subdirectory(extlib/cairo)
|
||||||
set(CAIRO_FOUND YES)
|
set(CAIRO_FOUND YES)
|
||||||
set(CAIRO_LIBRARIES cairo)
|
set(CAIRO_LIBRARIES cairo)
|
||||||
set(CAIRO_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/cairo/src)
|
set(CAIRO_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/cairo/src)
|
||||||
list(APPEND CAIRO_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/cairo/src)
|
list(APPEND CAIRO_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/cairo/src)
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT MINGW)
|
if(NOT MINGW)
|
||||||
message(STATUS "Using prebuilt SpaceWare")
|
message(STATUS "Using prebuilt SpaceWare")
|
||||||
|
@ -172,10 +170,8 @@ elseif(APPLE)
|
||||||
find_package(Freetype REQUIRED)
|
find_package(Freetype REQUIRED)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
find_library(CAIRO_LIBRARIES cairo REQUIRED)
|
||||||
find_library(CAIRO_LIBRARIES cairo REQUIRED)
|
find_path(CAIRO_INCLUDE_DIRS cairo.h PATH_SUFFIXES cairo)
|
||||||
find_path(CAIRO_INCLUDE_DIRS cairo.h PATH_SUFFIXES cairo)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
||||||
else() # Linux and compatible systems
|
else() # Linux and compatible systems
|
||||||
|
@ -189,13 +185,10 @@ else() # Linux and compatible systems
|
||||||
find_package(Freetype REQUIRED)
|
find_package(Freetype REQUIRED)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||||
pkg_check_modules(CAIRO REQUIRED cairo)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
||||||
pkg_check_modules(JSONC REQUIRED json-c)
|
pkg_check_modules(JSONC REQUIRED json-c)
|
||||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
|
||||||
|
|
||||||
if(GUI STREQUAL "gtk3")
|
if(GUI STREQUAL "gtk3")
|
||||||
set(HAVE_GTK3 TRUE)
|
set(HAVE_GTK3 TRUE)
|
||||||
|
|
Loading…
Reference in New Issue