support building tomato as a lib/shared object

This commit is contained in:
2024-05-29 10:38:57 +02:00
parent ba7188cf66
commit ef79aa8b80
2 changed files with 10 additions and 2 deletions

View File

@ -1,8 +1,15 @@
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
cmake_minimum_required(VERSION 3.9...3.24 FATAL_ERROR)
########################################
add_executable(tomato
if (TOMATO_MAIN_SO)
add_library(tomato MODULE)
target_compile_definitions(tomato PUBLIC TOMATO_MAIN_SO)
else()
add_executable(tomato)
endif()
target_sources(tomato PUBLIC
./main.cpp
./icon.rc