diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2de4fdd62..2772080cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -331,6 +331,6 @@ jobs: steps: - uses: actions/checkout@v3 - name: CMake generation - run: cmake -S c -B c/build -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/target + run: cmake -S . -B build -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/target - name: CMake build / install - run: cmake --build c/build --target install + run: cmake --build build --target install diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..d754d331c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.9) + +project(libblake3 + VERSION 1.5.0 + DESCRIPTION "BLAKE3 C implementation" + LANGUAGES C ASM +) + +include_directories(c) +add_subdirectory(c) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index c73b9c7c4..091189663 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.9) - -project(libblake3 - VERSION 1.5.0 - DESCRIPTION "BLAKE3 C implementation" - LANGUAGES C ASM -) - include(FeatureSummary) include(GNUInstallDirs) @@ -167,7 +159,7 @@ install(FILES ) configure_file(libblake3.pc.in libblake3.pc @ONLY) -install(FILES "${CMAKE_BINARY_DIR}/libblake3.pc" +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libblake3.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") # print feature summary