2025-11-26 07:03:34 +09:00
|
|
|
include_guard(DIRECTORY)
|
2025-11-18 19:16:29 +09:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
|
|
macro(setup_project name dir)
|
|
|
|
|
project(
|
|
|
|
|
${name}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
file(
|
|
|
|
|
GLOB
|
|
|
|
|
${name}_SRC
|
|
|
|
|
*.c
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(
|
|
|
|
|
${name}
|
|
|
|
|
${${name}_SRC}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(
|
|
|
|
|
${name}
|
|
|
|
|
PRIVATE
|
2025-11-22 02:29:57 +09:00
|
|
|
MDECore Mw
|
2025-11-18 19:16:29 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install(
|
|
|
|
|
TARGETS ${name}
|
|
|
|
|
DESTINATION ${dir}
|
|
|
|
|
)
|
|
|
|
|
endmacro()
|
2025-11-26 07:03:34 +09:00
|
|
|
|
|
|
|
|
macro(math_add name)
|
|
|
|
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
|
|
|
target_link_libraries(
|
|
|
|
|
${name}
|
|
|
|
|
PRIVATE
|
|
|
|
|
m
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
endmacro()
|