new_build_system (#18)
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

Reviewed-on: #18
This commit is contained in:
2024-09-06 15:05:48 +00:00
parent 9d3e4b8767
commit a7239558bd
191 changed files with 10683 additions and 10598 deletions

View File

@ -26,7 +26,7 @@ function(set_common_target_options name)
endif()
endfunction(set_common_target_options)
function(add_project_executable2 name dependencies libraries headers sources)
function(add_project_executable2 name dependencies libraries headers sources is_win32)
if (PROJECT_WINDOWS_VERSION_RC)
list(APPEND sources ${PROJECT_WINDOWS_VERSION_RC})
endif()
@ -52,6 +52,10 @@ function(add_project_executable2 name dependencies libraries headers sources)
if(PROJECT_ENABLE_SDL AND PROJECT_IS_MINGW)
target_link_libraries(${name} PRIVATE SDL2::SDL2main)
endif ()
if (is_win32 AND PROJECT_IS_MINGW)
target_link_options(${name} PRIVATE -mwindows)
endif()
endfunction(add_project_executable2)
function(add_project_executable name dependencies libraries)
@ -69,7 +73,15 @@ function(add_project_executable name dependencies libraries)
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cxx
)
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}")
if(PROJECT_ENABLE_WXWIDGETS OR PROJECT_ENABLE_SDL OR PROJECT_ENABLE_SFML OR PROJECT_ENABLE_NANA)
set(IS_WIN32 ON)
endif()
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}" "${IS_WIN32}")
if(PROJECT_ENABLE_WXWIDGETS)
target_link_libraries(${name} PRIVATE ${wxWidgets_LIBRARIES})
endif()
endfunction(add_project_executable)
function(add_project_library name dependencies libraries additional_sources)
@ -121,7 +133,7 @@ function(add_project_test_executable name dependencies libraries)
${additional_sources}
)
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}")
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}" OFF)
target_compile_definitions(${name} PRIVATE -DPROJECT_TESTING)