Skip to content

Commit

Permalink
Move the project() call earlier
Browse files Browse the repository at this point in the history
Call project() after the cmake_minimum_required() and cmake_policy()
calls, but before everything else.

Fix the following warning message from
.github/workflows/ci-windows-installed.yml:

  -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
  Hint: The project() command has not yet been called.  It sets up
  system-specific search paths.
  • Loading branch information
wantehchang committed Jul 18, 2024
1 parent 5b207c0 commit 00157e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW) # valid for DOWNLOAD_EXTRACT_TIMESTAMP option in CMake 3.24 and later
endif()

project(libavif LANGUAGES C VERSION 1.1.0)

# The root directory of the avif source
set(AVIF_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")

Expand All @@ -25,8 +27,6 @@ include(FetchContent)
include(FindPkgConfig)
include(AvifExternalProjectUtils)

project(libavif LANGUAGES C VERSION 1.1.0)

# Set C99 as the default
set(CMAKE_C_STANDARD 99)

Expand Down

0 comments on commit 00157e1

Please sign in to comment.