Skip to content

Commit

Permalink
Make target-specific define target-specific
Browse files Browse the repository at this point in the history
  • Loading branch information
elmindreda committed Dec 9, 2019
1 parent c194193 commit db76abb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

if (GLFW_USE_OSMESA)
add_definitions(-DUSE_NATIVE_OSMESA)
endif()

if (WIN32)
set(ICON glfw.rc)
elseif (APPLE)
Expand Down Expand Up @@ -63,6 +59,10 @@ set(CONSOLE_BINARIES offscreen)
set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES
FOLDER "GLFW3/Examples")

if (GLFW_USE_OSMESA)
target_compile_definitions(offscreen PRIVATE USE_NATIVE_OSMESA)
endif()

if (MSVC)
# Tell MSVC to use main instead of WinMain for Windows subsystem executables
set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES
Expand Down

0 comments on commit db76abb

Please sign in to comment.