Debian Codegraph @

gr2fonttest/CMakeLists.txt

raw
1 # SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later
2 # Copyright 2010, SIL International, All rights reserved.
3 CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
4
5 project(gr2fonttest)
6
7 enable_testing()
8
9 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
10 add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DUNICODE)
11 endif()
12
13 add_executable(gr2fonttest gr2FontTest.cpp UtfCodec.cpp)
14 target_link_libraries(gr2fonttest graphite2)
15
16 if (BUILD_SHARED_LIBS)
17 # copy the DLL so that gr2fonttest can find it
18 add_custom_target(${PROJECT_NAME}_copy_dll ALL
19 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})
20 add_dependencies(${PROJECT_NAME}_copy_dll graphite2 gr2fonttest)
21 endif()
22
23 install(TARGETS gr2fonttest EXPORT gr2fonttest RUNTIME DESTINATION bin)