enable_language(C) add_library(External SHARED "${CMAKE_CURRENT_BINARY_DIR}/external.c") file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/ExternalLibrary-$>.cmake" CONTENT "set(EXTERNAL_LIBRARY \"$\")\n") file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake" CONTENT " # no required actions ")