You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
666 B

1 month ago
cmake_minimum_required(VERSION 3.10)
get_filename_component(TARGET_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
1 month ago
set(COMMON_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt")
if(EXISTS ${COMMON_CMAKE_PATH})
include(${COMMON_CMAKE_PATH})
else()
message(FATAL_ERROR "Cannot find common build logic at ${COMMON_CMAKE_PATH}")
endif()
if(TARGET common)
target_link_libraries(${TARGET_NAME} INTERFACE common)
1 month ago
else()
message(FATAL_ERROR "[${TARGET_NAME}] Dependency 'common' not found.")
1 month ago
endif()
if(TARGET log)
target_link_libraries(${TARGET_NAME} INTERFACE log)
1 month ago
else()
message(WARNING "[${TARGET_NAME}] Dependency 'log' not found.")
1 month ago
endif()