diff --git a/.justfile b/.justfile index 7d287d7..31916df 100644 --- a/.justfile +++ b/.justfile @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 202ebce..f8cc705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}")