Build: Don't link with glad if GL is disabled

This commit is contained in:
Stenzek 2023-08-22 18:36:16 +10:00
parent e108ca16ce
commit 520e94226d
3 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,5 @@
add_subdirectory(fmt)
add_subdirectory(gsl)
add_subdirectory(glad)
add_subdirectory(stb)
add_subdirectory(zlib)
add_subdirectory(zstd)
@ -22,6 +21,10 @@ if(ENABLE_CUBEB)
add_subdirectory(cubeb)
endif()
if(ENABLE_OPENGL)
add_subdirectory(glad)
endif()
if(ENABLE_DISCORD_PRESENCE)
add_subdirectory(discord-rpc)
endif()

View file

@ -4,7 +4,7 @@ add_executable(duckstation-nogui
nogui_platform.h
)
target_link_libraries(duckstation-nogui PRIVATE core util common imgui glad scmversion)
target_link_libraries(duckstation-nogui PRIVATE core util common imgui scmversion)
if(WIN32)
message(STATUS "Building Win32 NoGUI Platform.")

View file

@ -171,7 +171,7 @@ qt6_add_translation(QM_FILES ${TS_FILES})
add_executable(duckstation-qt ${SRCS} ${QM_FILES})
target_include_directories(duckstation-qt PRIVATE "${Qt6Gui_PRIVATE_INCLUDE_DIRS}" "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(duckstation-qt PRIVATE core common imgui glad minizip scmversion Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Network)
target_link_libraries(duckstation-qt PRIVATE core common imgui minizip scmversion Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Network)
if(WIN32)
# We want a Windows subsystem application not console.