Make target-specific define target-specific

This commit is contained in:
Camilla Löwy 2019-12-09 17:04:34 +01:00
parent c194193797
commit db76abb63c

View File

@ -11,10 +11,6 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif() endif()
if (GLFW_USE_OSMESA)
add_definitions(-DUSE_NATIVE_OSMESA)
endif()
if (WIN32) if (WIN32)
set(ICON glfw.rc) set(ICON glfw.rc)
elseif (APPLE) elseif (APPLE)
@ -63,6 +59,10 @@ set(CONSOLE_BINARIES offscreen)
set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES
FOLDER "GLFW3/Examples") FOLDER "GLFW3/Examples")
if (GLFW_USE_OSMESA)
target_compile_definitions(offscreen PRIVATE USE_NATIVE_OSMESA)
endif()
if (MSVC) if (MSVC)
# Tell MSVC to use main instead of WinMain for Windows subsystem executables # Tell MSVC to use main instead of WinMain for Windows subsystem executables
set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES