Skip to content

Commit

Permalink
build(cmake): adjust installation paths on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
k4yt3x committed Jan 10, 2025
1 parent 49ce40b commit 55556e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ build:
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
-DCMAKE_INSTALL_BINDIR="." \
-DCMAKE_INSTALL_LIBDIR="." \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DCMAKE_INSTALL_DATADIR="." \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
Expand Down
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,14 @@ install(FILES
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Video2X"
)

# Install model files
install(DIRECTORY "${CMAKE_SOURCE_DIR}/models"
DESTINATION "${CMAKE_INSTALL_DATADIR}/video2x"
)
# Install the model files
if(WIN32)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/models" DESTINATION "${CMAKE_INSTALL_DATADIR}")
else()
install(DIRECTORY "${CMAKE_SOURCE_DIR}/models" DESTINATION "${CMAKE_INSTALL_DATADIR}/video2x")
endif()

# Platform-specific installation rules
# Install the FFmpeg and ncnn shared libraries
if(WIN32)
file(GLOB ffmpeg_dlls "${ffmpeg_base_path}/bin/*.dll")
install(FILES ${ffmpeg_dlls} DESTINATION "${CMAKE_INSTALL_BINDIR}")
Expand Down

0 comments on commit 55556e6

Please sign in to comment.