File: CMakeLists.txt

package info (click to toggle)
graphite2 1.3.14-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 23,576 kB
  • sloc: cpp: 14,738; cs: 1,998; python: 1,737; ansic: 1,673; perl: 184; xml: 123; sh: 96; makefile: 53
file content (21 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)

project(gr2fonttest)

enable_testing()

if  (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
	add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DUNICODE)
endif()

add_executable(gr2fonttest gr2FontTest.cpp UtfCodec.cpp)
target_link_libraries(gr2fonttest graphite2)

if (BUILD_SHARED_LIBS)
    # copy the DLL so that gr2fonttest can find it
    add_custom_target(${PROJECT_NAME}_copy_dll ALL
	    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${graphite2_core_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}graphite2${CMAKE_SHARED_LIBRARY_SUFFIX} ${PROJECT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
    add_dependencies(${PROJECT_NAME}_copy_dll graphite2 gr2fonttest)
endif()

install(TARGETS gr2fonttest EXPORT gr2fonttest RUNTIME DESTINATION bin)