linuxOS_D21X/source/artinchip/test-pm-mbox/CMakeLists.txt

25 lines
700 B
CMake
Raw Normal View History

2024-11-29 08:13:19 +00:00
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
2025-06-05 06:33:02 +00:00
project(test_pm_mbox LANGUAGES C)
2024-11-29 08:13:19 +00:00
# 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 -Werror)
2025-06-05 06:33:02 +00:00
add_executable(test_pm_mbox test_pm_mbox.c)
2024-11-29 08:23:11 +00:00
2025-06-05 06:33:02 +00:00
target_link_libraries(test_pm_mbox pthread)
2024-11-29 08:13:19 +00:00
# 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)
2025-06-05 06:33:02 +00:00
install(TARGETS test_pm_mbox RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
2024-11-29 08:13:19 +00:00
endif() # CMAKE_INSTALL_FULL_LIBDIR