fix windows

This commit is contained in:
2024-03-11 05:19:02 +11:00
parent 5061d1714d
commit 79c2dd9c98
2 changed files with 10 additions and 2 deletions

View File

@@ -8,8 +8,9 @@ add_executable(Lesson10 Lesson10.cpp)
set_target_properties(Lesson10 PROPERTIES
CXX_STANDARD 98
WIN32_EXECUTABLE ON)
target_link_libraries(Lesson10 SDL3::SDL3 OpenGL::GL)
target_link_libraries(Lesson10 SDL3::SDL3 OpenGL::GL $<$<PLATFORM_ID:Windows>:OpenGL::GLU>)
target_compile_options(Lesson10 PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -pedantic>)
target_compile_definitions(Lesson10 PRIVATE $<$<CXX_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
get_property(SDL3_IMPORTED_LOCATION TARGET SDL3::SDL3 PROPERTY IMPORTED_LOCATION)