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.

20 lines
536 B

cmake_language (CALL cmake_minimum_required VERSION 3.17...3.18)
cmake_language (CALL project CheckProject VERSION 1.2.3 LANGUAGES C)
if (NOT PROJECT_NAME STREQUAL "CheckProject")
message (SEND_ERROR "error on project() usage.")
endif()
if (NOT CheckProject_VERSION VERSION_EQUAL "1.2.3")
message (SEND_ERROR "error on project() usage.")
endif()
get_property (languages GLOBAL PROPERTY ENABLED_LANGUAGES)
if (NOT "C" IN_LIST languages)
message (SEND_ERROR "error on project() usage.")
endif()
add_library (lib SHARED lib.c)