linuxOS_D21X/source/artinchip/test-touchscreen/CMakeLists.txt
2024-11-29 16:23:11 +08:00

27 lines
728 B
CMake

cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(test-touchscreen LANGUAGES C)
# Suppress cmake unused warning
set(ignore ${BUILD_DOC} ${BUILD_DOCS} ${BUILD_EXAMPLE} ${BUILD_EXAMPLES}
${BUILD_SHARED_LIBS}${BUILD_TEST}${BUILD_TESTING}${BUILD_TESTS})
add_compile_options(-Wall)
add_executable(ts_draw ts_draw.c)
# Find libts for link
find_library(LIBTS libts.so)
target_link_libraries(ts_draw ${LIBTS})
# Install
# install directories
if(NOT CMAKE_INSTALL_PREFIX)
message(FATAL_ERROR "ERROR: CMAKE_INSTALL_PREFIX is not defined.")
endif()
include(GNUInstallDirs)
if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
install(TARGETS ts_draw RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
endif() # CMAKE_INSTALL_FULL_LIBDIR