Skip to content

Commit

Permalink
Move setting of pkgconfig exe location to before findpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankiesz authored Apr 11, 2024
1 parent f2ae491 commit 8b1a78b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ endif()

############# find dependent libraries ############

if (WIN32)
if(EXISTS "C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
set(PKG_CONFIG_EXECUTABLE "C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
elseif(EXISTS "D:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
set(PKG_CONFIG_EXECUTABLE "D:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
else()
message("pkg-config.exe not found in GStreamer installation.")
endif()
endif()

find_package(Threads)
find_package(PkgConfig REQUIRED)

Expand Down Expand Up @@ -122,15 +132,6 @@ endif()
message("LOG4CPLUS_INCLUDE_DIR is ${LOG4CPLUS_INCLUDE_DIR}")
message("LOG4CPLUS_LIBRARIES is ${LOG4CPLUS_LIBRARIES}")

if (WIN32)
if(EXISTS "C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
set(PKG_CONFIG_EXECUTABLE "C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
elseif(EXISTS "D:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
set(PKG_CONFIG_EXECUTABLE "D:\\gstreamer\\1.0\\msvc_x86_64\\bin\\pkg-config.exe")
else()
message("pkg-config.exe not found in GStreamer installation.")
endif()
endif()

############# Enable Sanitizers ############
if(${CMAKE_C_COMPILER_ID} MATCHES "GNU|Clang")
Expand Down

0 comments on commit 8b1a78b

Please sign in to comment.