cmake_minimum_required(VERSION 3.18) project(stb_image) set(CMAKE_CXX_STANDARD 20) if (UNIX AND NOT APPLE) add_library(stb_image SHARED "include/stb_image.h") endif() if (WIN32) add_library(stb_image STATIC "include/stb_image.h") endif() set_target_properties(stb_image PROPERTIES LINKER_LANGUAGE CXX) target_include_directories(stb_image PUBLIC "include")