refactor(simu): use SDL & ImGui (#6233)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: Malte Langermann <malte@langermann.net>
This commit is contained in:
co-authored by
raphaelcoeffic
Malte Langermann
parent
14287cb91d
commit
4eddda034d
+17
-31
@@ -1,41 +1,27 @@
|
||||
|
||||
option(DISABLE_COMPANION "Disable building companion and simulators" OFF)
|
||||
|
||||
# if(WIN32)
|
||||
# set(WIN_EXTRA_LIBS_PATH "C:/Programs" CACHE PATH
|
||||
# "Base path to extra libs/headers on Windows (SDL & pthreads folders should be in here).")
|
||||
# list(APPEND CMAKE_PREFIX_PATH "${WIN_EXTRA_LIBS_PATH}" "${WIN_EXTRA_LIBS_PATH}/SDL") # hints for FindSDL
|
||||
# endif()
|
||||
|
||||
# libfox
|
||||
find_package(Fox QUIET) # QUIET not working on WIN32?
|
||||
if (FOX_FOUND)
|
||||
message(STATUS "Foxlib found at ${FOX_LIBRARY}")
|
||||
else()
|
||||
message("Libfox not found, simu target will not be available")
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_COMPANION)
|
||||
include(QtDefs)
|
||||
endif(NOT DISABLE_COMPANION)
|
||||
|
||||
if(Qt5Core_FOUND OR FOX_FOUND)
|
||||
set(SDL2_BUILDING_LIBRARY YES) # this prevents FindSDL from appending SDLmain lib to the results, which we don't want
|
||||
find_package("SDL2")
|
||||
if(SDL2_FOUND)
|
||||
# find_package("SDL2") does not set a variable holding the path to the location of the SDL2 shared library
|
||||
find_file(SDL2_LIB_PATH
|
||||
NAMES
|
||||
libSDL2.so
|
||||
SDL2.dll
|
||||
SDL2.dylib
|
||||
HINTS
|
||||
"/usr/lib/x86_64-linux-gnu"
|
||||
${SDL2_LIBRARY_PATH})
|
||||
message(STATUS "SDL2 Lib: ${SDL2_LIB_PATH} Libs: ${SDL2_LIBRARIES}; Headers: ${SDL2_INCLUDE_DIRS}")
|
||||
else()
|
||||
message(STATUS "SDL2 not found! Simulator audio, and joystick inputs, will not work.")
|
||||
endif()
|
||||
# this prevents FindSDL from appending SDLmain lib to the results, which we don't want
|
||||
set(SDL2_BUILDING_LIBRARY YES)
|
||||
find_package("SDL2")
|
||||
|
||||
if(SDL2_FOUND)
|
||||
# find_package("SDL2") does not set a variable holding the path to the location of the SDL2 shared library
|
||||
find_file(SDL2_LIB_PATH
|
||||
NAMES
|
||||
libSDL2.so
|
||||
SDL2.dll
|
||||
SDL2.dylib
|
||||
HINTS
|
||||
"/usr/lib/x86_64-linux-gnu"
|
||||
${SDL2_LIBRARY_PATH})
|
||||
message(STATUS "SDL2 Lib: ${SDL2_LIB_PATH} Libs: ${SDL2_LIBRARIES}; Headers: ${SDL2_INCLUDE_DIRS}")
|
||||
else()
|
||||
message(STATUS "SDL not found! Simulator audio, and joystick inputs, will not work.")
|
||||
endif()
|
||||
|
||||
if(Qt5Core_FOUND AND NOT DISABLE_COMPANION)
|
||||
|
||||
Reference in New Issue
Block a user