forked from sammycage/lunasvg
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·40 lines (30 loc) · 1.03 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.3)
project(lunasvg VERSION 2.3.9 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 11)
option(BUILD_SHARED_LIBS "Build as a shared library" OFF)
option(LUNASVG_BUILD_EXAMPLES "Build example(s)" OFF)
add_library(lunasvg)
add_subdirectory(include)
add_subdirectory(source)
add_subdirectory(3rdparty/plutovg)
if(BUILD_SHARED_LIBS)
target_compile_definitions(lunasvg PUBLIC LUNASVG_SHARED)
target_compile_definitions(lunasvg PRIVATE LUNASVG_EXPORT)
endif()
if(LUNASVG_BUILD_EXAMPLES)
add_executable(svg2png svg2png.cpp)
target_link_libraries(svg2png PRIVATE lunasvg)
target_include_directories(svg2png PRIVATE 3rdparty/stb)
endif()
set(LUNASVG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
set(LUNASVG_INCDIR ${CMAKE_INSTALL_PREFIX}/include)
install(FILES
include/lunasvg.h
DESTINATION ${LUNASVG_INCDIR}
)
install(TARGETS lunasvg
LIBRARY DESTINATION ${LUNASVG_LIBDIR}
ARCHIVE DESTINATION ${LUNASVG_LIBDIR}
INCLUDES DESTINATION ${LUNASVG_INCDIR}
)