file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test-shared.c" "int init(void) {}")
try_compile(
  SUPPORT_SHARED_LIBS "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/test-shared.c"
  CMAKE_FLAGS "-fPIC" LINK_OPTIONS "-shared" OUTPUT_VARIABLE CHECK_SHARED_LIBS)

message("SUPPORT_SHARED_LIBS: ${SUPPORT_SHARED_LIBS}")
message("CHECK_SHARED_LIBS: ${CHECK_SHARED_LIBS}")
