add win32 (msvc) support

This commit is contained in:
2024-11-14 16:56:12 +00:00
parent c14c2e5500
commit d614e110df
35 changed files with 454 additions and 280 deletions

View File

@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.25)
project(bluelib C)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(b_modules core object term cmd)
set(b_system_name ${CMAKE_SYSTEM_NAME})
@@ -21,6 +23,8 @@ foreach (module ${b_modules})
misc/CuTest.h)
target_link_libraries(blue-${module}-units blue-${module})
target_include_directories(blue-${module}-units PRIVATE misc/)
set_target_properties(blue-${module}-units PROPERTIES FOLDER "Tests/${module}")
endif ()
file(GLOB test_sources ${module}-test/*.c)
@@ -30,6 +34,8 @@ foreach (module ${b_modules})
get_filename_component(test_name ${test_file} NAME_WE)
add_executable(blue-${module}-${test_name} ${test_file})
set_target_properties(blue-${module}-${test_name} PROPERTIES FOLDER "Tests/${module}")
target_link_libraries(blue-${module}-${test_name} blue-${module})
endforeach (test_file)
endif ()