Skip to content

Commit

Permalink
Try to fix linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
howard0su committed Dec 9, 2023
1 parent 22e7d34 commit 0e5a430
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ project (DaedalusX64 LANGUAGES C CXX ASM)

message(${CMAKE_SYSTEM_PROCESSOR} " Detected")

INCLUDE(FindPkgConfig)

add_subdirectory(Source)
9 changes: 7 additions & 2 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,13 @@ if(DAEDALUS_SDL)

if(NOT PSP)
# PSP is not needed as it uses built-in native font
find_package(SDL2_ttf REQUIRED)
link_libraries(SDL2_ttf::SDL2_ttf)
find_package(SDL2_ttf QUIET)
if(SDL2_ttf_FOUND)
link_libraries(SDL2_ttf::SDL2_ttf)
else()
PKG_SEARCH_MODULE(SDL2_TTF REQUIRED SDL2_ttf>=2.0.0)
link_libraries(${SDL2_TTF_LIBRARIES})
endif()
endif()
endif(DAEDALUS_SDL)

Expand Down
13 changes: 0 additions & 13 deletions Source/SysGL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@

file(GLOB SRC_FILES Graphics/*.cpp HLEGraphics/*.cpp Input/*.cpp Interface/*.cpp)

add_library(SysGL OBJECT ${SRC_FILES})

find_package(OpenGL REQUIRED)
target_include_directories(SysGL PUBLIC ${OPENGL_INCLUDE_DIR})
link_libraries(OpenGL::GL)

find_package(GLEW REQUIRED)
target_include_directories(SysGL PUBLIC ${GLEW_INCLUDE_DIRS})
link_libraries(GLEW::GLEW)

find_package(SDL2 CONFIG REQUIRED)
target_include_directories(SysGL PUBLIC ${SDL2_INCLUDE_DIRS})
link_libraries(SDL2::SDL2)

# PSP is not needed as it uses built-in native font
find_package(SDL2_ttf REQUIRED)
target_include_directories(SysGL PUBLIC ${SDL2_TTF_INCLUDE_DIRS})
link_libraries(SDL2_ttf::SDL2_ttf)

install(FILES ${PROJECT_SOURCE_DIR}/Source/SysGL/HLEGraphics/n64.psh DESTINATION DaedalusX64)

Expand Down

0 comments on commit 0e5a430

Please sign in to comment.