aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/frontend/qt_sdl/CMakeLists.txt10
2 files changed, 9 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f1a5a91..491a583 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,9 +93,9 @@ if (ENABLE_JIT)
endif()
endif()
-find_library(LIBZIP_LIB zip)
+
if (WIN32)
- target_link_libraries(core ole32 comctl32 ws2_32 opengl32 ${LIBZIP_LIB})
+ target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
else()
- target_link_libraries(core GL EGL ${LIBZIP_LIB})
+ target_link_libraries(core GL EGL)
endif()
diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt
index ea7849f..5617f25 100644
--- a/src/frontend/qt_sdl/CMakeLists.txt
+++ b/src/frontend/qt_sdl/CMakeLists.txt
@@ -47,6 +47,7 @@ set(CMAKE_AUTORCC ON)
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SDL2 REQUIRED sdl2)
+pkg_check_modules(LIBZIP REQUIRED libzip)
if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Release))
add_executable(melonDS WIN32 ${SOURCES_QT_SDL})
@@ -57,15 +58,16 @@ endif()
target_link_libraries(melonDS ${CMAKE_THREAD_LIBS_INIT})
target_include_directories(melonDS PRIVATE ${SDL2_INCLUDE_DIRS})
+target_include_directories(melonDS PRIVATE ${LIBZIP_INCLUDE_DIRS})
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../..")
target_link_libraries(melonDS core)
if (BUILD_STATIC)
- target_link_libraries(melonDS -static ${SDL2_LIBRARIES})
+ target_link_libraries(melonDS -static ${SDL2_LIBRARIES} ${LIBZIP_STATIC_LIBRARIES})
else()
- target_link_libraries(melonDS ${SDL2_LIBRARIES})
+ target_link_libraries(melonDS ${SDL2_LIBRARIES} ${LIBZIP_LIBRARIES})
endif()
if (UNIX)
@@ -75,9 +77,9 @@ elseif (WIN32)
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
target_sources(melonDS PUBLIC "${CMAKE_SOURCE_DIR}/melon.rc")
- target_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi gdi32)
+ target_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi gdi32 bcrypt)
if (BUILD_STATIC)
- target_link_libraries(melonDS imm32 winmm version setupapi -static Qt5::Core Qt5::Gui Qt5::Widgets z zstd)
+ target_link_libraries(melonDS imm32 winmm version setupapi -static Qt5::Core Qt5::Gui Qt5::Widgets zstd)
else()
target_link_libraries(melonDS Qt5::Core Qt5::Gui Qt5::Widgets)
endif()