Fix build on Debian 10

This commit is contained in:
Howard Su 2020-10-22 23:55:49 +08:00
parent 0d45217dfd
commit 5400a4e18a
2 changed files with 6 additions and 3 deletions

View File

@ -6,7 +6,7 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "-O2 /std:c++17") set(CMAKE_CXX_FLAGS "-O2 /std:c++17")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
else() else()
set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -fpermissive") set(CMAKE_CXX_FLAGS "-g -O3 -std=c++17 -fpermissive")
endif (MSVC) endif (MSVC)
add_definitions(-DSDRPP_IS_CORE) add_definitions(-DSDRPP_IS_CORE)
@ -75,6 +75,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(sdrpp_core PUBLIC X11) target_link_libraries(sdrpp_core PUBLIC X11)
target_link_libraries(sdrpp_core PUBLIC Xxf86vm) target_link_libraries(sdrpp_core PUBLIC Xxf86vm)
target_link_libraries(sdrpp_core PUBLIC dl) target_link_libraries(sdrpp_core PUBLIC dl)
target_link_libraries(sdrpp_core PUBLIC stdc++fs)
endif () endif ()

View File

@ -139,7 +139,9 @@ int sdrpp_main() {
glfwMaximizeWindow(window); glfwMaximizeWindow(window);
} }
#if (GLFW_VERSION_MINOR == 3) && (GLFW_VERSION_MINOR >= 2)
glfwSetWindowMaximizeCallback(window, maximized_callback); glfwSetWindowMaximizeCallback(window, maximized_callback);
#endif
// Load app icon // Load app icon
GLFWimage icons[10]; GLFWimage icons[10];