From cdeb3fa112b18c463a86c2474642b06170d4d6a4 Mon Sep 17 00:00:00 2001 From: Simon Inns Date: Wed, 4 Feb 2026 17:54:10 +0100 Subject: [PATCH] Moved environment to Nix --- .github/workflows/tests.yml | 44 +-- .gitignore | 3 + BUILD.md | 38 ++ CMakeLists.txt | 203 ++++++++--- INSTALL.md | 39 ++ cmake_modules/FindFFTW.cmake | 46 --- cmake_modules/FindGetopt.cmake | 70 ---- cmake_modules/LdDecodeTests.cmake | 115 ------ docs-tech/BUILD.md | 251 ------------- docs-tech/INSTALL.md | 342 ------------------ flake.lock | 78 ++++ flake.nix | 83 +++++ .../ld-process-ac3/decode/CMakeLists.txt | 2 +- prototypes/ld-process-efm/CMakeLists.txt | 2 +- src/efm-decoder/libs/efm/CMakeLists.txt | 2 +- src/efm-decoder/libs/ezpwd | 1 - .../tools/efm-decoder-audio/CMakeLists.txt | 2 +- .../tools/efm-decoder-d24/CMakeLists.txt | 2 +- .../tools/efm-decoder-data/CMakeLists.txt | 2 +- .../tools/efm-decoder-f2/CMakeLists.txt | 2 +- .../tools/efm-stacker-f2/CMakeLists.txt | 2 +- .../tools/vfs-verifier/CMakeLists.txt | 2 +- 22 files changed, 423 insertions(+), 908 deletions(-) create mode 100644 BUILD.md create mode 100644 INSTALL.md delete mode 100644 cmake_modules/FindFFTW.cmake delete mode 100644 cmake_modules/FindGetopt.cmake delete mode 100644 cmake_modules/LdDecodeTests.cmake delete mode 100644 docs-tech/BUILD.md delete mode 100644 docs-tech/INSTALL.md create mode 100644 flake.lock create mode 100644 flake.nix delete mode 160000 src/efm-decoder/libs/ezpwd diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 47b2a831..0db440a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,35 +11,29 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - name: Install dependencies - timeout-minutes: 10 - run: | - sudo apt-get update - # Based on: https://github.com/happycube/ld-decode/wiki/Installation - # Added: cmake qt6-base-dev libgl-dev (needed by QtGui) - sudo apt-get install -y --no-install-recommends git cmake make python3-setuptools python3-numpy python3-scipy python3-matplotlib qt6-base-dev libgl-dev libfftw3-dev python3-numba libavformat-dev libavcodec-dev libavutil-dev ffmpeg libsqlite3-dev libqt6sql6-sqlite - - - name: Set up build dir - timeout-minutes: 1 - run: mkdir build - - - name: Configure - timeout-minutes: 5 - run: cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. + - name: Install Nix + uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable - - name: Build - timeout-minutes: 15 - run: make -C build VERBOSE=1 + - name: Show Nix info + run: nix --version - - name: Install - timeout-minutes: 5 - run: make -C build install DESTDIR=/tmp/staging && ls -lR /tmp/staging + - name: Build (Nix) + timeout-minutes: 20 + run: nix build .# - - name: Run tests - timeout-minutes: 10 - run: cd build && ctest --output-on-failure + - name: Configure, build, and test (Nix dev shell) + timeout-minutes: 20 + run: | + nix develop -c bash -lc " + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo && + cmake --build build --verbose && + cmake --install build --prefix /tmp/staging && + ctest --test-dir build --output-on-failure + " diff --git a/.gitignore b/.gitignore index f798b0f9..3bbcf17d 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,6 @@ ld_decode.egg-info/ # Compilation script compile.bat + +# Nix artefacts +result diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000..18bc9afa --- /dev/null +++ b/BUILD.md @@ -0,0 +1,38 @@ +# Build (Nix) + +This project uses a Nix dev shell to provide a consistent build environment. + +## Enter the dev shell + +```bash +nix develop +``` + +This exposes all build dependencies (CMake, Ninja, Qt6, FFmpeg, FFTW, SQLite, OpenGL, etc.). + +## Configure and build + +```bash +cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release +ninja -C build +``` + +Artifacts will be under `build/`. + +## Build without entering the shell (one-off) + +```bash +nix develop -c cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release +nix develop -c ninja -C build +``` + +## Optional: clean build + +```bash +rm -rf build +``` + +## Notes + +- The flake sets `-DEZPWD_DIR`, `-DAPP_BRANCH`, and `-DAPP_COMMIT` automatically for package builds. +- The dev shell exports `EZPWD_DIR`, so manual builds via `nix develop` pick it up automatically. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1692dfe4..96b5132f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,40 @@ option(BUILD_PYTHON OFF ) +# Path to ezpwd headers (can be overridden by external builds) +set(EZPWD_DIR "" CACHE PATH + "Path to ezpwd C++ headers (directory containing ezpwd/rs_base)" +) + +if(NOT EZPWD_DIR AND DEFINED ENV{EZPWD_DIR}) + set(EZPWD_DIR "$ENV{EZPWD_DIR}" CACHE PATH + "Path to ezpwd C++ headers (directory containing ezpwd/rs_base)" + FORCE + ) +endif() + +if(NOT EZPWD_DIR) + set(_EZPWD_CANDIDATES + "${CMAKE_SOURCE_DIR}/src/efm-decoder/libs/ezpwd/c++" + "${CMAKE_SOURCE_DIR}/src/efm-decoder/libs/ezpwd" + ) + foreach(_EZPWD_CANDIDATE IN LISTS _EZPWD_CANDIDATES) + if(EXISTS "${_EZPWD_CANDIDATE}/ezpwd/rs_base") + set(EZPWD_DIR "${_EZPWD_CANDIDATE}" CACHE PATH + "Path to ezpwd C++ headers (directory containing ezpwd/rs_base)" + FORCE + ) + break() + endif() + endforeach() + unset(_EZPWD_CANDIDATES) + unset(_EZPWD_CANDIDATE) +endif() + +if(NOT EZPWD_DIR OR NOT EXISTS "${EZPWD_DIR}/ezpwd/rs_base") + message(FATAL_ERROR "EZPWD_DIR is not set or invalid. Set -DEZPWD_DIR=/path/to/ezpwd/c++ or initialize the ezpwd submodule at src/efm-decoder/libs/ezpwd. (Nix builds pass this automatically).") +endif() + # Check for dependencies # When using Qt 6.3, you can replace the code block below with qt_standard_project_setup() @@ -90,56 +124,16 @@ message(STATUS "Qt Version: ${QT_VERSION}") find_package(PkgConfig REQUIRED) -if(NOT MSVC) - pkg_check_modules(FFTW IMPORTED_TARGET fftw3) - if(FFTW_FOUND) - # ..... - set(FFTW_INCLUDE_DIR ${FFTW_INCLUDE_DIRS}) - set(FFTW_LIBRARY PkgConfig::FFTW) - else() - find_package(FFTW REQUIRED) - endif() -else() - # pkg-config seems to - # result in trying to link to m.lib - # which breaks build on - # MSVC, so just use the cmake.config from - # the vcpkg install instead. - find_package(FFTW3 REQUIRED) - set(FFTW_INCLUDE_DIR ${FFTW3_INCLUDE_DIRS}) - find_library(FFTW_LIBRARY ${FFTW3_LIBRARIES} ${FFTW3_LIBRARY_DIRS}) -endif() - -# Get the Git branch and revision - -execute_process( - COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE -) - -execute_process( - COMMAND git log -1 --format=%h - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE -) - -# Check if there are uncommitted changes -execute_process( - COMMAND git diff-index --quiet HEAD -- - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE GIT_DIRTY -) +pkg_check_modules(FFTW REQUIRED IMPORTED_TARGET fftw3) +set(FFTW_INCLUDE_DIR ${FFTW_INCLUDE_DIRS}) +set(FFTW_LIBRARY PkgConfig::FFTW) -# Add -dirty suffix if there are uncommitted changes -if(GIT_DIRTY) - set(GIT_COMMIT_HASH "${GIT_COMMIT_HASH}-dirty") -endif() +# Build metadata (set by Nix or other build systems) +set(APP_BRANCH "nix" CACHE STRING "Build source identifier") +set(APP_COMMIT "0.0.0" CACHE STRING "Build version identifier") -add_compile_definitions(APP_BRANCH=\"${GIT_BRANCH}\") -add_compile_definitions(APP_COMMIT=\"${GIT_COMMIT_HASH}\") +add_compile_definitions(APP_BRANCH=\"${APP_BRANCH}\") +add_compile_definitions(APP_COMMIT=\"${APP_COMMIT}\") # Subdirectories @@ -164,5 +158,116 @@ if(BUILD_TESTING) add_subdirectory(src/library/tbc/testmetadata) add_subdirectory(src/library/tbc/testvbidecoder) add_subdirectory(src/library/tbc/testvitcdecoder) - include(LdDecodeTests) + + # Tests for the ld-decode tools. + # Most of the tests expect that you have cloned (or symlinked) the + # ld-decode-testdata repo within the source directory as "testdata". + # Chroma tests run sequentially to avoid file conflicts + + set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/scripts) + set(TESTDATA_DIR ${CMAKE_SOURCE_DIR}/testdata) + + add_test( + NAME chroma-ntsc-rgb + COMMAND ${SCRIPTS_DIR}/test-chroma + --build ${CMAKE_BINARY_DIR} + --system ntsc + --expect-psnr 25 + --expect-psnr-range 0.5 + ) + + add_test( + NAME chroma-ntsc-ycbcr + COMMAND ${SCRIPTS_DIR}/test-chroma + --build ${CMAKE_BINARY_DIR} + --system ntsc + --expect-psnr 25 + --expect-psnr-range 0.5 + --input-format yuv + ) + set_tests_properties(chroma-ntsc-ycbcr PROPERTIES DEPENDS chroma-ntsc-rgb) + + add_test( + NAME chroma-pal-rgb + COMMAND ${SCRIPTS_DIR}/test-chroma + --build ${CMAKE_BINARY_DIR} + --system pal + --expect-psnr 25 + --expect-psnr-range 0.5 + ) + set_tests_properties(chroma-pal-rgb PROPERTIES DEPENDS chroma-ntsc-ycbcr) + + add_test( + NAME chroma-pal-ycbcr + COMMAND ${SCRIPTS_DIR}/test-chroma + --build ${CMAKE_BINARY_DIR} + --system pal + --expect-psnr 25 + --expect-psnr-range 0.5 + --input-format yuv + ) + set_tests_properties(chroma-pal-ycbcr PROPERTIES DEPENDS chroma-pal-rgb) + + # Tests using pre-generated TBC files (ld-decode/ld-cut not part of this repo) + # Note: These tests were previously named ld-cut-ntsc and decode-ntsc-cav but both + # used the same source file. Now using pre-generated TBC, they test the same pipeline. + add_test( + NAME decode-pretbc-ntsc-cav + COMMAND ${SCRIPTS_DIR}/test-decode-pretbc + --build ${CMAKE_BINARY_DIR} + --decoder mono --decoder ntsc2d --decoder ntsc3d + --expect-frames 29 + --expect-bpsnr 43.3 + --expect-vbi 9151563,15925840,15925840 + --expect-efm-samples 40572 + ${CMAKE_SOURCE_DIR}/test-data/ntsc/ve-snw-cut + ) + + add_test( + NAME decode-pretbc-ntsc-clv + COMMAND ${SCRIPTS_DIR}/test-decode-pretbc + --build ${CMAKE_BINARY_DIR} + --no-efm-timecodes + --expect-frames 4 + --expect-bpsnr 37.6 + --expect-vbi 9167913,15785241,15785241 + ${CMAKE_SOURCE_DIR}/test-data/ntsc/issue176 + ) + + add_test( + NAME decode-pretbc-pal-cav + COMMAND ${SCRIPTS_DIR}/test-decode-pretbc + --build ${CMAKE_BINARY_DIR} + --pal + --decoder mono --decoder pal2d --decoder transform2d --decoder transform3d + --expect-frames 4 + --expect-bpsnr 38.4 + --expect-vbi 9151527,16065688,16065688 + --expect-vitc 2,10,8,13,4,3,0,1 + --expect-efm-samples 5292 + ${CMAKE_SOURCE_DIR}/test-data/pal/jason-testpattern + ) + + add_test( + NAME decode-pretbc-pal-clv + COMMAND ${SCRIPTS_DIR}/test-decode-pretbc + --build ${CMAKE_BINARY_DIR} + --pal + --no-efm + --expect-frames 9 + --expect-bpsnr 30.3 + --expect-vbi 0,8449774,8449774 + ${CMAKE_SOURCE_DIR}/test-data/pal/kagemusha-leadout-cbar + ) + + add_test( + NAME decode-pretbc-pal-ggv + COMMAND ${SCRIPTS_DIR}/test-decode-pretbc + --build ${CMAKE_BINARY_DIR} + --pal + --no-efm # GGV discs do not contain EFM data + --expect-frames 24 + --expect-vbi 9152512,15730528,15730528 + ${CMAKE_SOURCE_DIR}/test-data/pal/ggv-mb-1khz + ) endif() diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..3a7f2bd5 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,39 @@ +# Installation (Nix) + +This project ships a Nix flake that provides both a build and a development environment. The simplest way to install is with Nix flakes. + +## Prerequisites + +- Nix with flakes enabled. + - Ensure `experimental-features = nix-command flakes` is set in your Nix config. + +## Install with Nix + +### Install into your user profile + +```bash +nix profile install .# +``` + +This installs the tools into your Nix profile (for example, `~/.nix-profile/bin`). + +### Build without installing + +```bash +nix build .# +``` + +The build output will be available under `./result`. + +### Run from the build output + +```bash +./result/bin/ld-analyse +``` + +Replace `ld-analyse` with any other tool from the suite. + +## Notes + +- The flake pins all required dependencies, including Qt6, FFmpeg, FFTW, SQLite, and OpenGL. +- Build metadata (branch/commit) is set by the flake during the build. diff --git a/cmake_modules/FindFFTW.cmake b/cmake_modules/FindFFTW.cmake deleted file mode 100644 index b4aec5f7..00000000 --- a/cmake_modules/FindFFTW.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# Find FFTW -# ~~~~~~~~ -# Once run this will define: -# -# FFTW_FOUND = system has FFTW lib -# FFTW_LIBRARY = full path to the FFTW library -# FFTW_INCLUDE_DIR = where to find headers -# -set(FFTW_LIBRARY_NAMES fftw3 libfftw3 fftw3-3 libfftw3-3 fftw3l libfftw3l fftw3l-3 libfftw3l-3 fftw3q libfftw3q fftw3q-3 libfftw3q-3 ) - -find_library(FFTW_LIBRARY - NAMES ${FFTW_LIBRARY_NAMES} - PATHS - /usr/lib - /usr/lib/fftw - /usr/lib/fftw3 - /usr/local/lib - /usr/local/lib/fftw - /usr/local/lib/fftw3 - "$ENV{LIB_DIR}/lib" - "$ENV{LIB}" -) - -FIND_PATH(FFTW_INCLUDE_DIR NAMES fftw3.h PATHS - /usr/include - /usr/include/fftw - /usr/include/fftw3 - /usr/local/include - /usr/local/include/fftw - /usr/local/include/fftw3 - "$ENV{LIB_DIR}/include" - "$ENV{INCLUDE}" - PATH_SUFFIXES fftw3 fftw -) - -IF (FFTW_INCLUDE_DIR AND FFTW_LIBRARY) - SET(FFTW_FOUND TRUE) -ENDIF (FFTW_INCLUDE_DIR AND FFTW_LIBRARY) - -IF (FFTW_FOUND) - MESSAGE(STATUS "Found fftw3: ${FFTW_LIBRARY}") -ELSE (FFTW_FOUND) - IF (FFTW_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find fftw3 : ${FFTW_INCLUDE_DIR} - ${FFTW_LIBRARY}") - ENDIF (FFTW_FIND_REQUIRED) -ENDIF (FFTW_FOUND) \ No newline at end of file diff --git a/cmake_modules/FindGetopt.cmake b/cmake_modules/FindGetopt.cmake deleted file mode 100644 index 23980bd5..00000000 --- a/cmake_modules/FindGetopt.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# Based on FindALSA.cmake from cmake project -# CMake - Cross Platform Makefile Generator -# Copyright 2000-2022 Kitware, Inc. and Contributors -# All rights reserved. -# Distributed under the OSI-approved BSD 3-Clause License. See -# https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindGetopt --------- - -Find Getopt (Getopt) - -Find the Getopt librariy (``Getopt``) - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``Getopt::Getopt``, if -Getopt has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -``Getopt_FOUND`` - True if Getopt_INCLUDE_DIR & Getopt_LIBRARY are found - -``Getopt_LIBRARIES`` - List of libraries when using Getopt. - -``Getopt_INCLUDE_DIRS`` - Where to find the Getopt headers. - -Cache variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``Getopt_INCLUDE_DIR`` - the Getopt include directory - -``Getopt_LIBRARY`` - the absolute path of the asound library -#]=======================================================================] - -find_path(Getopt_INCLUDE_DIR NAMES getopt.h - DOC "The Getopt include directory" -) - -find_library(Getopt_LIBRARY NAMES getopt - DOC "The Getopt library" -) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Getopt - REQUIRED_VARS Getopt_LIBRARY Getopt_INCLUDE_DIR) - -if(Getopt_FOUND) - set( Getopt_LIBRARIES ${Getopt_LIBRARY} ) - set( Getopt_INCLUDE_DIRS ${Getopt_INCLUDE_DIR} ) - if(NOT TARGET Getopt::Getopt) - add_library(Getopt::Getopt UNKNOWN IMPORTED) - set_target_properties(Getopt::Getopt PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Getopt_INCLUDE_DIRS}") - set_property(TARGET Getopt::Getopt APPEND PROPERTY IMPORTED_LOCATION "${Getopt_LIBRARY}") - endif() -endif() - -mark_as_advanced(Getopt_INCLUDE_DIR Getopt_LIBRARY) \ No newline at end of file diff --git a/cmake_modules/LdDecodeTests.cmake b/cmake_modules/LdDecodeTests.cmake deleted file mode 100644 index a87c9e62..00000000 --- a/cmake_modules/LdDecodeTests.cmake +++ /dev/null @@ -1,115 +0,0 @@ -# Tests for the ld-decode tools. - -# Most of the tests expect that you have cloned (or symlinked) the -# ld-decode-testdata repo within the source directory as "testdata". - -# Chroma tests run sequentially to avoid file conflicts - -set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/scripts) -set(TESTDATA_DIR ${CMAKE_SOURCE_DIR}/testdata) - -add_test( - NAME chroma-ntsc-rgb - COMMAND ${SCRIPTS_DIR}/test-chroma - --build ${CMAKE_BINARY_DIR} - --system ntsc - --expect-psnr 25 - --expect-psnr-range 0.5 -) - -add_test( - NAME chroma-ntsc-ycbcr - COMMAND ${SCRIPTS_DIR}/test-chroma - --build ${CMAKE_BINARY_DIR} - --system ntsc - --expect-psnr 25 - --expect-psnr-range 0.5 - --input-format yuv -) -set_tests_properties(chroma-ntsc-ycbcr PROPERTIES DEPENDS chroma-ntsc-rgb) - -add_test( - NAME chroma-pal-rgb - COMMAND ${SCRIPTS_DIR}/test-chroma - --build ${CMAKE_BINARY_DIR} - --system pal - --expect-psnr 25 - --expect-psnr-range 0.5 -) -set_tests_properties(chroma-pal-rgb PROPERTIES DEPENDS chroma-ntsc-ycbcr) - -add_test( - NAME chroma-pal-ycbcr - COMMAND ${SCRIPTS_DIR}/test-chroma - --build ${CMAKE_BINARY_DIR} - --system pal - --expect-psnr 25 - --expect-psnr-range 0.5 - --input-format yuv -) -set_tests_properties(chroma-pal-ycbcr PROPERTIES DEPENDS chroma-pal-rgb) - -# Tests using pre-generated TBC files (ld-decode/ld-cut not part of this repo) -# Note: These tests were previously named ld-cut-ntsc and decode-ntsc-cav but both -# used the same source file. Now using pre-generated TBC, they test the same pipeline. -add_test( - NAME decode-pretbc-ntsc-cav - COMMAND ${SCRIPTS_DIR}/test-decode-pretbc - --build ${CMAKE_BINARY_DIR} - --decoder mono --decoder ntsc2d --decoder ntsc3d - --expect-frames 29 - --expect-bpsnr 43.3 - --expect-vbi 9151563,15925840,15925840 - --expect-efm-samples 40572 - ${CMAKE_SOURCE_DIR}/test-data/ntsc/ve-snw-cut -) - -add_test( - NAME decode-pretbc-ntsc-clv - COMMAND ${SCRIPTS_DIR}/test-decode-pretbc - --build ${CMAKE_BINARY_DIR} - --no-efm-timecodes - --expect-frames 4 - --expect-bpsnr 37.6 - --expect-vbi 9167913,15785241,15785241 - ${CMAKE_SOURCE_DIR}/test-data/ntsc/issue176 -) - -add_test( - NAME decode-pretbc-pal-cav - COMMAND ${SCRIPTS_DIR}/test-decode-pretbc - --build ${CMAKE_BINARY_DIR} - --pal - --decoder mono --decoder pal2d --decoder transform2d --decoder transform3d - --expect-frames 4 - --expect-bpsnr 38.4 - --expect-vbi 9151527,16065688,16065688 - --expect-vitc 2,10,8,13,4,3,0,1 - --expect-efm-samples 5292 - ${CMAKE_SOURCE_DIR}/test-data/pal/jason-testpattern -) - -add_test( - NAME decode-pretbc-pal-clv - COMMAND ${SCRIPTS_DIR}/test-decode-pretbc - --build ${CMAKE_BINARY_DIR} - --pal - --no-efm - --expect-frames 9 - --expect-bpsnr 30.3 - --expect-vbi 0,8449774,8449774 - ${CMAKE_SOURCE_DIR}/test-data/pal/kagemusha-leadout-cbar -) - -add_test( - NAME decode-pretbc-pal-ggv - COMMAND ${SCRIPTS_DIR}/test-decode-pretbc - --build ${CMAKE_BINARY_DIR} - --pal - --no-efm # GGV discs do not contain EFM data - --expect-frames 24 - --expect-vbi 9152512,15730528,15730528 - ${CMAKE_SOURCE_DIR}/test-data/pal/ggv-mb-1khz -) - -# End of LdDecodeTests.cmake \ No newline at end of file diff --git a/docs-tech/BUILD.md b/docs-tech/BUILD.md deleted file mode 100644 index 1b782cd7..00000000 --- a/docs-tech/BUILD.md +++ /dev/null @@ -1,251 +0,0 @@ -# Building ld-decode - -This project uses CMake and enforces out-of-source builds. All build artifacts are kept in a separate `build/` directory, keeping the source tree clean. - -## Cloning the Repository - -This project uses git submodules for test data and dependencies. Clone the repository with `--recursive` to automatically fetch all submodules: - -```bash -git clone --recursive https://github.com/happycube/ld-decode.git -cd ld-decode -``` - -**If you already cloned without `--recursive`**, initialize and update submodules: - -```bash -git submodule update --init --recursive -``` - -## Quick Start - -```bash -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -make -j8 -ctest --output-on-failure -``` - -## Step-by-Step Instructions - -### 1. Create a Build Directory - -```bash -mkdir build -cd build -``` - -Keep the build directory separate from the source tree. This is a CMake best practice. - -### 2. Configure the Build - -```bash -cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -``` - -This configures the build with: -- **RelWithDebInfo**: Release build with debug symbols for better profiling and debugging -- **..**: Points to the source directory (parent directory) - -The cmake step will: -- Detect your system's compiler and libraries -- Find Qt6 libraries -- Configure build files for your platform - -### 3. Build the Project - -```bash -make -j8 -``` - -Builds all targets using 8 parallel jobs. Adjust the number based on your CPU core count. - -**Single-threaded build** (if parallel builds cause issues): -```bash -make -``` - -### 4. Run Tests - -```bash -ctest --output-on-failure -``` - -Runs all tests sequentially. Tests must run sequentially due to shared testout directory. - -**Run specific test**: -```bash -ctest -R chroma --output-on-failure -``` - -### 5. Install (Optional) - -```bash -make install DESTDIR=/tmp/staging -``` - -Installs built binaries and libraries to the staging directory. - -## Building Individual Tools - -You can build specific tools or libraries without building the entire project: - -```bash -# Build a single tool -make ld-analyse -make ld-chroma-decoder -make ld-json-converter -``` - -**Common tool targets:** -- `ld-analyse` - GUI analysis tool -- `ld-chroma-decoder` - Chroma decoder -- `ld-chroma-encoder` - Chroma encoder -- `ld-json-converter` - JSON to SQLite converter -- `ld-process-vbi` - VBI processor -- `ld-process-vits` - VITS processor -- `ld-cut` - Cut/segment tool -- `ld-discmap` - Disc mapper -- `ld-dropout-correct` - Dropout corrector - -**Library targets:** -- `lddecode-library` - Core library -- `lddecode-chroma` - Chroma decoder library - -**Test targets:** -- `testfilter` - Filter tests -- `testlinenumber` - Line number tests -- `testmetadata` - Metadata tests -- `testvbidecoder` - VBI decoder tests -- `testvitcdecoder` - VITC decoder tests - -**View all available targets:** -```bash -make help | grep "^ [a-z]" -``` - -## Build Options - -You can customize the build with additional CMake variables: - -```bash -cmake -DCMAKE_BUILD_TYPE=Release .. -``` - -**Available build types:** -- `Debug` - Debug symbols, no optimization -- `Release` - Optimized, no debug symbols -- `RelWithDebInfo` - Optimized with debug symbols (recommended) -- `MinSizeRel` - Minimized size - -### Qt Debug Symbols - -To include Qt debug symbols for debugging Qt-related issues: - -**Option 1: Debug build (full debug, no optimization)** -```bash -cd build -cmake -DCMAKE_BUILD_TYPE=Debug .. -make -j8 -``` - -**Option 2: Optimized build with Qt debug symbols** -```bash -cd build -cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DQT_DEBUG=ON .. -make -j8 -``` - -**Option 3: Reconfigure existing build** -If you already have a build directory, you can reconfigure: -```bash -cd build -cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DQT_DEBUG=ON .. -make -j8 -``` - -Debug builds will be larger and slower but provide better debugging information for stepping through code and inspecting Qt internals. - -## Troubleshooting - -### Rebuilding After Source Changes - -If you make changes to `CMakeLists.txt`, cmake will automatically reconfigure during the next `make` invocation. - -### Clean Build - -To perform a clean build: - -```bash -rm -rf build -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -make -j8 -``` - -### In-Source Build Error - -If you accidentally run cmake in the source directory, you'll see: - -``` -In-source builds are not allowed. Please create a build directory and run: - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -``` - -Simply follow those instructions to fix it. - -## Dependencies - -The project requires: -- CMake 3.16 or later -- Qt6 (Core, Gui, Widgets, Sql) -- C++17 compatible compiler (GCC 7+, Clang 5+, MSVC 2019+) -- FFTW3 -- FFmpeg (libavcodec, libavformat, libavutil) -- Python 3.6+ -- SQLite3 - -### Ubuntu/Debian - -```bash -sudo apt-get install cmake qt6-base-dev libgl-dev libfftw3-dev libavformat-dev \ - libavcodec-dev libavutil-dev ffmpeg libsqlite3-dev libqt6sql6-sqlite -``` - -### macOS (Homebrew) - -```bash -brew install cmake qt6 fftw ffmpeg sqlite3 -``` - -## Build Output - -All build artifacts are placed in the `build/` directory: -- `build/` - All CMake files, object files, and executables -- Source tree remains clean - -The root directory only contains: -- Source code (`lddecode/`, `tools/`, `scripts/`, etc.) -- Configuration files (`CMakeLists.txt`, `setup.py`, etc.) -- Documentation - -## For CI/CD - -The GitHub Actions workflow uses: - -```yaml -- name: Configure - run: cd build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. - -- name: Build - run: make -C build VERBOSE=1 - -- name: Run tests - run: cd build && ctest --output-on-failure -``` - -Tests run sequentially (no `-j` flag) to avoid race conditions in the shared testout directory. diff --git a/docs-tech/INSTALL.md b/docs-tech/INSTALL.md deleted file mode 100644 index 1b92dc3c..00000000 --- a/docs-tech/INSTALL.md +++ /dev/null @@ -1,342 +0,0 @@ -# Installing ld-decode - -This document describes how to install ld-decode tools and libraries after building. - -## Quick Install - -### Using Staging Directory (No sudo required) - -```bash -cd build -make install DESTDIR=/tmp/staging -``` - -This installs all built targets to the staging directory without requiring root privileges. - -### System-wide Installation (Requires sudo) - -```bash -cd build -sudo make install -``` - -This installs to `/usr/local` and requires root privileges to write to system directories. - -## Installation Overview - -ld-decode uses the standard CMake install process. Built binaries, libraries, and Python modules are installed to target directories based on the system type and build configuration. - -### Sudo Requirements - -- **Staging directory** (`DESTDIR=/tmp/staging` or similar): No sudo needed -- **System directories** (`/usr/local`, `/usr`, `/opt`): Requires `sudo` -- **Custom user directory** (e.g., `~/.local`): No sudo needed with appropriate prefix - -### Default Installation Directories - -When you build ld-decode, the `make install` command will place files in standard system directories: - -| Component | Default Location | Notes | -|-----------|------------------|-------| -| Executables (tools) | `/usr/local/bin` | Command-line tools like `ld-analyse`, `ld-chroma-decoder` | -| Libraries | `/usr/local/lib` | Compiled C++ libraries | -| Python modules | `/usr/local/lib/python*/site-packages` | `lddecode` Python package | -| Headers | `/usr/local/include` | Development headers | -| CMake configs | `/usr/local/lib/cmake` | CMake package configuration files | - -### Using a Staging Directory (Recommended) - -For testing or packaging, install to a staging directory instead: - -```bash -make install DESTDIR=/tmp/staging -``` - -This places files in: -``` -/tmp/staging/ -├── usr/local/bin/ # Executables -├── usr/local/lib/ # Libraries -└── usr/local/lib/python3.x/site-packages/ # Python modules -``` - -**Advantage:** You can examine and test the installation without affecting your system, or prepare files for packaging. - -### Custom Installation Prefix - -To use a different base directory (instead of `/usr/local`): - -```bash -cd build -cmake -DCMAKE_INSTALL_PREFIX=/opt/ld-decode .. -make -j8 -make install -``` - -This will install to: -``` -/opt/ld-decode/ -├── bin/ # Executables -├── lib/ # Libraries -└── lib/python3.x/site-packages/ # Python modules -``` - -**Combining with DESTDIR:** -```bash -cmake -DCMAKE_INSTALL_PREFIX=/opt/ld-decode .. -make install DESTDIR=/tmp/staging -``` - -Files go to: `/tmp/staging/opt/ld-decode/` - -## Installation Components - -### Executables - -Tools are installed to `bin/`: -- `ld-analyse` - GUI analysis tool -- `ld-chroma-decoder` - Chroma decoder -- `ld-chroma-encoder` - Chroma encoder -- `ld-json-converter` - JSON to SQLite converter -- `ld-process-vbi` - VBI processor -- `ld-process-vits` - VITS processor -- `ld-cut` - Cut/segment tool -- `ld-discmap` - Disc mapper -- `ld-dropout-correct` - Dropout corrector -- `ld-lds-converter` - LDS format converter -- `ld-export-metadata` - Export metadata tool -- `ld-disc-stacker` - Disc stacker - -### Libraries - -C++ libraries are installed to `lib/`: -- `liblddecode-library.a` - Core static library -- `liblddecode-chroma.a` - Chroma decoding library - -### Python Modules - -The Python package is installed to `lib/python3.x/site-packages/`: -- `lddecode/` - Main Python package - - `core.py` - Core decoding functions - - `utils.py` - Utility functions - - `efm_pll.py` - EFM PLL implementation - - `commpy_filters.py` - Filter implementations - - Other supporting modules - -After installation, you can import in Python: -```python -import lddecode -from lddecode.core import LDDecode -``` - -## Verifying Installation - -### Check Executables - -```bash -# If installed to /usr/local/bin -which ld-analyse -ld-analyse --version - -# If installed to custom location -/opt/ld-decode/bin/ld-analyse --version -``` - -### Check Python Module - -```bash -python3 -c "import lddecode; print(lddecode.__file__)" -``` - -### List Installed Files - -With DESTDIR staging: -```bash -find /tmp/staging -type f -``` - -This shows all files that would be installed to the system. - -## Uninstalling - -If you installed to system directories and need to uninstall, you'll need to manually remove files. The staging directory approach avoids this: - -```bash -# With DESTDIR staging, just remove the directory -rm -rf /tmp/staging -``` - -For system-wide installations, CMake doesn't provide a built-in uninstall command. You would need to: -1. Keep track of installed files -2. Manually remove them -3. Or use your system's package manager if you packaged it - -## Installation Examples - -### Development Installation (Staging Directory) - -Build and install to a temporary staging directory for testing: - -```bash -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -make -j8 -make install DESTDIR=/tmp/ld-decode-staging - -# Test the installation -/tmp/ld-decode-staging/usr/local/bin/ld-analyse --version -``` - -### System-wide Installation - -Install to `/usr/local` (may require sudo): - -```bash -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=Release .. -make -j8 -sudo make install - -# Test the installation -ld-analyse --version -which ld-analyse -``` - -### Custom Prefix Installation - -Install to a custom location (e.g., `/opt/ld-decode`): - -```bash -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/ld-decode .. -make -j8 -sudo make install - -# Add to PATH (add to ~/.bashrc for permanent) -export PATH=/opt/ld-decode/bin:$PATH -ld-analyse --version -``` - -### Creating a Package - -Prepare files for creating an RPM or DEB package: - -```bash -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. -make -j8 -make install DESTDIR=./package-root - -# Inspect the package structure -tree ./package-root -``` - -## Troubleshooting - -### Permission Denied - -If you get "Permission denied" when installing to system directories: - -```bash -sudo make install -``` - -Or use DESTDIR to avoid needing sudo: -```bash -make install DESTDIR=$HOME/ld-decode-install -``` - -### Python Module Not Found - -If `import lddecode` fails after installation: - -1. Check the Python version used for installation: - ```bash - python3 -c "import sys; print(sys.version_info)" - ``` - -2. Verify installation location: - ```bash - find /usr/local -name "lddecode" -type d - ``` - -3. Check PYTHONPATH if using custom prefix: - ```bash - export PYTHONPATH=/opt/ld-decode/lib/python3.x/site-packages:$PYTHONPATH - python3 -c "import lddecode" - ``` - -4. **Using a Virtual Environment** (Recommended for Development) - - If you're developing or want to avoid system-wide Python packages, use a virtual environment: - - ```bash - # Create a virtual environment - python3 -m venv ~/ld-decode-venv - - # Activate it - source ~/ld-decode-venv/bin/activate - - # Install dependencies - pip install -r requirements.txt - - # Install ld-decode Python module - cd build - make install DESTDIR=~/ld-decode-staging - - # Or install directly into the venv - cd .. - pip install -e . - ``` - - **Benefits of virtual environments:** - - Isolated Python dependencies - - No sudo required - - Easy to test different versions - - Won't conflict with system Python packages - - **Note:** When using a virtual environment, remember to activate it before running ld-decode Python tools: - ```bash - source ~/ld-decode-venv/bin/activate - ``` - - To make this permanent, add the activation command to your `~/.bashrc` or `~/.zshrc`. - -5. **System vs. User Installation** - - If you don't want to use sudo or affect the system Python installation: - - ```bash - # Install to user directory (~/.local) - cd build - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - make -j8 - make install - - # Python will automatically find packages in ~/.local - python3 -c "import lddecode" - ``` - -### Tools Not in PATH - -If executables are installed but not found: - -```bash -# Check installation -ls -l /usr/local/bin/ld-* - -# Add to PATH (add to ~/.bashrc for permanent) -export PATH=/usr/local/bin:$PATH - -# Or use full path -/usr/local/bin/ld-analyse -``` - -For custom prefix: -```bash -export PATH=/opt/ld-decode/bin:$PATH -``` diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..c161378c --- /dev/null +++ b/flake.lock @@ -0,0 +1,78 @@ +{ + "nodes": { + "ezpwd": { + "flake": false, + "locked": { + "lastModified": 1729810798, + "narHash": "sha256-GKStalynr6nRTnr63ekna4thd/bayPHZ6MG81iz+MP0=", + "owner": "pjkundert", + "repo": "ezpwd-reed-solomon", + "rev": "62a490c13f6e057fbf2dc6777fde234c7a19098e", + "type": "github" + }, + "original": { + "owner": "pjkundert", + "repo": "ezpwd-reed-solomon", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1770115704, + "narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e6eae2ee2110f3d31110d5c222cd395303343b08", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "ezpwd": "ezpwd", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..0ec95fa0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,83 @@ +{ + description = "ld-decode-tools (Nix flake)"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + ezpwd = { + url = "github:pjkundert/ezpwd-reed-solomon"; + flake = false; + }; + }; + + outputs = { self, nixpkgs, flake-utils, ezpwd }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + ezpwdSrc = ezpwd; + in + let + packageVersion = "7.2.0"; + rev = if self ? rev then self.rev else ""; + shortRev = if self ? shortRev then self.shortRev else (if rev != "" then builtins.substring 0 7 rev else "unknown"); + dirtySuffix = if self ? dirtyRev then "-dirty" else ""; + branch = if self ? ref then self.ref else "nix"; + nixCommit = "${shortRev}${dirtySuffix}"; + in + { + packages.default = pkgs.stdenv.mkDerivation { + pname = "ld-decode-tools"; + version = packageVersion; + src = pkgs.lib.cleanSourceWith { + src = ./.; + filter = path: type: + let + base = pkgs.lib.baseNameOf path; + in + !(base == ".git" || base == "build" || base == "result"); + }; + + nativeBuildInputs = with pkgs; [ + cmake + ninja + pkg-config + qt6.wrapQtAppsHook + ]; + + buildInputs = with pkgs; [ + qt6.qtbase + qt6.qtsvg + fftw + ffmpeg + sqlite + libGL + ]; + + cmakeBuildType = "Release"; + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DEZPWD_DIR=${ezpwdSrc}/c++" + "-DAPP_BRANCH=${branch}" + "-DAPP_COMMIT=${nixCommit}" + ]; + }; + + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + cmake + ninja + pkg-config + qt6.qtbase + qt6.qtsvg + fftw + ffmpeg + sqlite + libGL + python3 + python3Packages.numpy + ]; + EZPWD_DIR = "${ezpwdSrc}/c++"; + }; + } + ); +} \ No newline at end of file diff --git a/prototypes/ld-process-ac3/decode/CMakeLists.txt b/prototypes/ld-process-ac3/decode/CMakeLists.txt index c9e5a7e1..655b8202 100644 --- a/prototypes/ld-process-ac3/decode/CMakeLists.txt +++ b/prototypes/ld-process-ac3/decode/CMakeLists.txt @@ -6,6 +6,6 @@ if(MSVC) target_link_libraries(ld-ac3-decode PRIVATE ${Getopt_LIBRARIES}) target_include_directories(ld-ac3-decode PRIVATE ${Getopt_INCLUDE_DIRS}) endif() -target_include_directories(ld-ac3-decode PRIVATE . ../../../tools/efm-decoder/libs/ezpwd/c++) +target_include_directories(ld-ac3-decode PRIVATE . ${EZPWD_DIR}) install(TARGETS ld-ac3-decode) diff --git a/prototypes/ld-process-efm/CMakeLists.txt b/prototypes/ld-process-efm/CMakeLists.txt index f399c2f0..24d507dc 100644 --- a/prototypes/ld-process-efm/CMakeLists.txt +++ b/prototypes/ld-process-efm/CMakeLists.txt @@ -26,7 +26,7 @@ add_executable(ld-process-efm Decoders/syncf3frames.cpp ) -target_include_directories(ld-process-efm PRIVATE . ../../tools/library/tbc ../../tools/efm-decoder/libs/ezpwd/c++) +target_include_directories(ld-process-efm PRIVATE . ../../tools/library/tbc ${EZPWD_DIR}) # Define application version info target_compile_definitions(ld-process-efm PRIVATE diff --git a/src/efm-decoder/libs/efm/CMakeLists.txt b/src/efm-decoder/libs/efm/CMakeLists.txt index 1d859538..a8cbe974 100644 --- a/src/efm-decoder/libs/efm/CMakeLists.txt +++ b/src/efm-decoder/libs/efm/CMakeLists.txt @@ -14,7 +14,7 @@ target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/tools/library) # Add the include directory for the ezpwd library -target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++) +target_include_directories(${TARGET_NAME} PRIVATE ${EZPWD_DIR}) # Link Qt and shared lddecode-library (for TBC logging) target_link_libraries(${TARGET_NAME} PUBLIC Qt::Core lddecode-library) diff --git a/src/efm-decoder/libs/ezpwd b/src/efm-decoder/libs/ezpwd deleted file mode 160000 index 62a490c1..00000000 --- a/src/efm-decoder/libs/ezpwd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62a490c13f6e057fbf2dc6777fde234c7a19098e diff --git a/src/efm-decoder/tools/efm-decoder-audio/CMakeLists.txt b/src/efm-decoder/tools/efm-decoder-audio/CMakeLists.txt index f3972433..2da81e69 100644 --- a/src/efm-decoder/tools/efm-decoder-audio/CMakeLists.txt +++ b/src/efm-decoder/tools/efm-decoder-audio/CMakeLists.txt @@ -20,7 +20,7 @@ target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/readers ${CMAKE_CURRENT_SOURCE_DIR}/src/writers ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/efm/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++ + ${EZPWD_DIR} ) # Link the Qt libraries diff --git a/src/efm-decoder/tools/efm-decoder-d24/CMakeLists.txt b/src/efm-decoder/tools/efm-decoder-d24/CMakeLists.txt index 83519aa4..6aee75fd 100644 --- a/src/efm-decoder/tools/efm-decoder-d24/CMakeLists.txt +++ b/src/efm-decoder/tools/efm-decoder-d24/CMakeLists.txt @@ -20,7 +20,7 @@ target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/readers ${CMAKE_CURRENT_SOURCE_DIR}/src/writers ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/efm/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++ + ${EZPWD_DIR} ) # Link the Qt libraries diff --git a/src/efm-decoder/tools/efm-decoder-data/CMakeLists.txt b/src/efm-decoder/tools/efm-decoder-data/CMakeLists.txt index 7d49cdb1..6d840647 100644 --- a/src/efm-decoder/tools/efm-decoder-data/CMakeLists.txt +++ b/src/efm-decoder/tools/efm-decoder-data/CMakeLists.txt @@ -20,7 +20,7 @@ target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/readers ${CMAKE_CURRENT_SOURCE_DIR}/src/writers ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/efm/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++ + ${EZPWD_DIR} ) # Link the Qt libraries diff --git a/src/efm-decoder/tools/efm-decoder-f2/CMakeLists.txt b/src/efm-decoder/tools/efm-decoder-f2/CMakeLists.txt index adca802c..e2035a7d 100644 --- a/src/efm-decoder/tools/efm-decoder-f2/CMakeLists.txt +++ b/src/efm-decoder/tools/efm-decoder-f2/CMakeLists.txt @@ -20,7 +20,7 @@ target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/readers ${CMAKE_CURRENT_SOURCE_DIR}/src/writers ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/efm/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++ + ${EZPWD_DIR} ) # Link the Qt libraries diff --git a/src/efm-decoder/tools/efm-stacker-f2/CMakeLists.txt b/src/efm-decoder/tools/efm-stacker-f2/CMakeLists.txt index d3878fe5..84a874e2 100644 --- a/src/efm-decoder/tools/efm-stacker-f2/CMakeLists.txt +++ b/src/efm-decoder/tools/efm-stacker-f2/CMakeLists.txt @@ -18,7 +18,7 @@ target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/readers ${CMAKE_CURRENT_SOURCE_DIR}/src/writers ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/efm/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++ + ${EZPWD_DIR} ) target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core lddecode-library efm) diff --git a/src/efm-decoder/tools/vfs-verifier/CMakeLists.txt b/src/efm-decoder/tools/vfs-verifier/CMakeLists.txt index 58f84ee0..5fdd9723 100644 --- a/src/efm-decoder/tools/vfs-verifier/CMakeLists.txt +++ b/src/efm-decoder/tools/vfs-verifier/CMakeLists.txt @@ -14,7 +14,7 @@ add_executable(${TARGET_NAME} ${SRC_FILES}) target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/efm/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/ezpwd/c++ + ${EZPWD_DIR} ) target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core lddecode-library efm)