cmake update

This commit is contained in:
Nishi 2025-12-17 19:24:52 +09:00
commit caf262f1a2
Signed by: nishi
GPG key ID: 27EF69B208EB9343
3 changed files with 12 additions and 12 deletions

View file

@ -1,7 +1,7 @@
include_guard(DIRECTORY)
include(GNUInstallDirs)
macro(setup_base type name dir)
macro(mde_setup_base type name dir)
project(
${name}
)
@ -43,15 +43,15 @@ macro(setup_base type name dir)
)
endmacro()
macro(setup_project name dir)
setup_base(project ${name} ${dir})
macro(mde_setup_project name dir)
mde_setup_base(project ${name} ${dir})
endmacro()
macro(setup_library name)
macro(mde_setup_library name)
if(ARGV2)
setup_base(library ${name} ARGV2)
mde_setup_base(library ${name} ARGV2)
else()
setup_base(library ${name} ${CMAKE_INSTALL_LIBDIR})
mde_setup_base(library ${name} ${CMAKE_INSTALL_LIBDIR})
endif()
if(EXISTS "../include")
@ -63,7 +63,7 @@ macro(setup_library name)
endif()
endmacro()
macro(math_add name)
macro(mde_math_add name)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
${name}

View file

@ -1,7 +1,7 @@
include_guard(DIRECTORY)
include(MDEPkgConfig)
macro(opengl_add name)
macro(mde_opengl_add name)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
${name}
@ -9,11 +9,11 @@ macro(opengl_add name)
opengl32
)
else()
pkg_config_add(${name} gl)
mde_pkg_config_add(${name} gl)
endif()
endmacro()
macro(glu_add name)
macro(mde_glu_add name)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
${name}
@ -21,6 +21,6 @@ macro(glu_add name)
glu32
)
else()
pkg_config_add(${name} glu)
mde_pkg_config_add(${name} glu)
endif()
endmacro()

View file

@ -1,7 +1,7 @@
include_guard(DIRECTORY)
find_package(PkgConfig)
macro(pkg_config_add dest name)
macro(mde_pkg_config_add dest name)
pkg_check_modules(${name} REQUIRED ${name})
target_include_directories(
${dest}