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