Skip to content

Commit

Permalink
[gccjit][cmake] update gccjit library search paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancern committed Nov 9, 2024
1 parent c6618fa commit a0bdecf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions cmake/FindGCCJIT.cmake
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
include_guard(GLOBAL)

set(GCCJIT_DIRECTORY "" CACHE PATH "Path to GCCJIT installation")
set(GCCJIT_ROOT "" CACHE PATH "Path to GCCJIT installation")
set(GCCJIT_INCLUDE_DIR "" CACHE PATH "Path to GCCJIT include directory")

if (GCCJIT_DIRECTORY)
message(STATUS "Using GCCJIT from ${GCCJIT_DIRECTORY}")
if (GCCJIT_ROOT)
message(STATUS "Using GCCJIT from ${GCCJIT_ROOT}")

if (NOT GCCJIT_INCLUDE_DIR)
set(GCCJIT_INCLUDE_DIR ${GCCJIT_DIRECTORY}/include)
set(GCCJIT_INCLUDE_DIR ${GCCJIT_ROOT}/include)
endif ()

set(GCCJIT_LIB_DIRS ${GCCJIT_DIRECTORY})
if (EXISTS ${GCCJIT_DIRECTORY}/lib)
list(APPEND GCCJIT_LIB_DIRS ${GCCJIT_DIRECTORY}/lib)
set(GCCJIT_LIB_DIRS ${GCCJIT_ROOT})
if (EXISTS ${GCCJIT_ROOT}/lib)
list(APPEND GCCJIT_LIB_DIRS ${GCCJIT_ROOT}/lib)
endif()
if (EXISTS ${GCCJIT_ROOT}/lib/gcc/current)
list(APPEND GCCJIT_LIB_DIRS ${GCCJIT_ROOT}/lib/gcc/current)
endif ()
endif ()

if (GCCJIT_INCLUDE_DIR)
Expand Down

0 comments on commit a0bdecf

Please sign in to comment.