ladybird/Ports/Super-Mario/patches/fix_cmakelists.patch
Manuel Palenzuela 4f690408af Ports: Added a Super-Mario clone port.
Added a minimal dependency super mario port. (Only depends on SDL, SDL_image and SDL_mixer).
2021-04-06 09:32:37 +02:00

30 lines
1.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 616d876..d1aa020 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,10 +18,13 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
endif()
endif()
-find_package(SDL2 REQUIRED)
-find_package(SDL2_Image REQUIRED)
-find_package(SDL2_Mixer REQUIRED)
-include_directories(${SDL2_INCLUDE_DIR} ${SDL2_IMAGE_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR})
+INCLUDE(FindPkgConfig)
+
+PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
+PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
+PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
+
+include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS})
file(COPY src/files DESTINATION .)
@@ -30,6 +33,6 @@ include_directories(src)
file(GLOB_RECURSE uMario_SOURCES "src/*.cpp")
add_executable (uMario ${uMario_SOURCES})
-target_link_libraries(uMario ${SDL2_LIBRARY} ${SDL2_IMAGE_LIBRARY} ${SDL2_MIXER_LIBRARY})
+target_link_libraries(uMario ${SDL2_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} ${SDL2_MIXER_LIBRARIES}-lSDL2_mixer -lpthread -lm -lgfx -lgui -lipc -lcore)
install(TARGETS uMario RUNTIME DESTINATION ${BIN_DIR})