mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 20:48:45 +08:00
050e71d01d
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [alac,benchmark,capnproto] Fix check_linkage call * [fastlz] Fix SHA512 * [coroutine] Fix dynamic build * [folly] Find double-conversion * [gamma] Use vcpkg_from_github * [librsync] Enable static builds * [netcdf-cxx4] Fix SHA512 * [octomap] Fix static build * [tidy-html5] Fix static build * [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime * [folly] Use ras0219's fix for link paths * [octomap] Fix exported targets * [uvatlas] Set tool download SHA512 * [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32 * [suitesparse] osx fix * [gtkmm] Call vcpkg_check_linkage after including vcpkg functions * [duktape] Resolve conflicts * [duktape] FIxed typo in Python paths * [wangle] Find zlib * [openssl-uwp] Fix SHA512 * [glib] Allow static builds on non-Windows * [suitesparse] Fix build on Windows * [multiple ports] Bump CONTROL version * [multiple ports] Fix description indent * [directxtk] Fix CONTROL file * [bde,duktape,qpid-proton] Build packages with python2 installed * [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [gdal,live555,uriparser] Fix regressions * [live555] Update to 2019.04.24
110 lines
3.0 KiB
CMake
110 lines
3.0 KiB
CMake
project(cairomm)
|
|
cmake_minimum_required(VERSION 3.4)
|
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake")
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
#get cairomm version
|
|
file (STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[cairomm\\], \\[.*\\].*" )
|
|
string(REGEX REPLACE "AC_INIT\\(\\[.*\\], \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT})
|
|
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CAIROMM_MAJOR_VERSION ${VERSION})
|
|
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" CAIROMM_MINOR_VERSION ${VERSION})
|
|
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CAIROMM_MICRO_VERSION ${VERSION})
|
|
message(STATUS "Ciaromm version: ${CAIROMM_MAJOR_VERSION}.${CAIROMM_MINOR_VERSION}.${CAIROMM_MICRO_VERSION}")
|
|
|
|
find_package(Cairo REQUIRED)
|
|
find_package(SigC++ REQUIRED)
|
|
|
|
#configure
|
|
option(BUILD_SHARED_LIBS "Build the shared library" ON)
|
|
|
|
option(CAIROMM_ENABLE_API_EXCEPTIONS "enable API exceptions" ON)
|
|
if(CAIROMM_ENABLE_API_EXCEPTIONS)
|
|
set(CAIROMM_EXCEPTIONS_ENABLED ON)
|
|
else()
|
|
set(CAIROMM_EXCEPTIONS_ENABLED OFF)
|
|
endif()
|
|
|
|
configure_file("build/cmake/cairommconfig.h.cmake" "cairommconfig.h")
|
|
configure_file("build/cmake/cairomm.rc.cmake" "cairomm.rc" @ONLY)
|
|
|
|
#build
|
|
set(cairomm_cc
|
|
cairomm/context.cc
|
|
cairomm/context_surface_quartz.cc
|
|
cairomm/context_surface_win32.cc
|
|
cairomm/context_surface_xlib.cc
|
|
cairomm/device.cc
|
|
cairomm/exception.cc
|
|
cairomm/fontface.cc
|
|
cairomm/fontoptions.cc
|
|
cairomm/matrix.cc
|
|
cairomm/path.cc
|
|
cairomm/pattern.cc
|
|
cairomm/private.cc
|
|
cairomm/quartz_font.cc
|
|
cairomm/quartz_surface.cc
|
|
cairomm/region.cc
|
|
cairomm/scaledfont.cc
|
|
cairomm/script.cc
|
|
cairomm/script_surface.cc
|
|
cairomm/surface.cc
|
|
cairomm/win32_font.cc
|
|
cairomm/win32_surface.cc
|
|
cairomm/xlib_surface.cc)
|
|
|
|
set(cairomm_public_h
|
|
cairomm/cairomm.h
|
|
cairomm/context.h
|
|
cairomm/device.h
|
|
cairomm/enums.h
|
|
cairomm/exception.h
|
|
cairomm/fontface.h
|
|
cairomm/fontoptions.h
|
|
cairomm/matrix.h
|
|
cairomm/path.h
|
|
cairomm/pattern.h
|
|
cairomm/quartz_font.h
|
|
cairomm/quartz_surface.h
|
|
cairomm/refptr.h
|
|
cairomm/region.h
|
|
cairomm/scaledfont.h
|
|
cairomm/script.h
|
|
cairomm/script_surface.h
|
|
cairomm/surface.h
|
|
cairomm/types.h
|
|
cairomm/win32_font.h
|
|
cairomm/win32_surface.h
|
|
cairomm/xlib_surface.h)
|
|
|
|
set(cairomm_private_h
|
|
cairomm/context_private.h
|
|
cairomm/private.h)
|
|
|
|
set(cairomm_rc
|
|
${CMAKE_BINARY_DIR}/cairomm.rc)
|
|
|
|
add_library(cairomm-1.0 ${cairomm_cc} ${cairomm_rc})
|
|
target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} )
|
|
target_include_directories(cairomm-1.0 PRIVATE
|
|
${CAIRO_INCLUDE_DIR}
|
|
${SIGC++_INCLUDE_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMAKE_SOURCE_DIR})
|
|
|
|
install(
|
|
TARGETS cairomm-1.0
|
|
RUNTIME DESTINATION bin
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib)
|
|
|
|
install(
|
|
FILES ${cairomm_public_h}
|
|
DESTINATION include/cairomm)
|
|
|
|
install(
|
|
FILES ${CMAKE_BINARY_DIR}/cairommconfig.h
|
|
DESTINATION include)
|