Use cmake's find_library to search for pytrellis.
This commit is contained in:
parent
643d7dec4c
commit
ea91ea163e
@ -6,18 +6,18 @@ if (NOT EXTERNAL_CHIPDB)
|
|||||||
set(TRELLIS_ROOT "/usr/local/share/trellis")
|
set(TRELLIS_ROOT "/usr/local/share/trellis")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB found_pytrellis ${TRELLIS_ROOT}/libtrellis/pytrellis.*
|
if (NOT DEFINED PYTRELLIS_LIBDIR)
|
||||||
/usr/lib/pytrellis.*
|
find_library(PYTRELLIS pytrellis.so
|
||||||
/usr/lib64/pytrellis.*
|
PATHS ${TRELLIS_ROOT}/libtrellis
|
||||||
/usr/lib/trellis/pytrellis.*
|
PATH_SUFFIXES trellis
|
||||||
/usr/lib64/trellis/pytrellis.*)
|
DOC "Location of pytrellis library")
|
||||||
|
|
||||||
if ("${found_pytrellis}" STREQUAL "")
|
if ("${PYTRELLIS}" STREQUAL "PYTRELLIS-NOTFOUND")
|
||||||
message(FATAL_ERROR "failed to locate pytrellis library!")
|
message(FATAL_ERROR "Failed to locate pytrellis library!")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(GET found_pytrellis 0 PYTRELLIS_LIB)
|
get_filename_component(PYTRELLIS_LIBDIR ${PYTRELLIS} DIRECTORY)
|
||||||
get_filename_component(PYTRELLIS_LIBDIR ${PYTRELLIS_LIB} DIRECTORY)
|
endif()
|
||||||
|
|
||||||
set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py)
|
set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user