Skip to content

Commit

Permalink
Merge branch 'master' into regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiehung committed Feb 11, 2019
2 parents 4ac5057 + 6cd0b8a commit 7bd4fa9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ecp5/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ if (NOT DEFINED TRELLIS_ROOT)
set(TRELLIS_ROOT "/usr/local/share/trellis")
endif()

file(GLOB found_pytrellis ${TRELLIS_ROOT}/libtrellis/pytrellis.*)
file(GLOB found_pytrellis ${TRELLIS_ROOT}/libtrellis/pytrellis.*
/usr/lib/pytrellis.*
/usr/lib64/pytrellis.*
/usr/lib/trellis/pytrellis.*
/usr/lib64/trellis/pytrellis.*)

if ("${found_pytrellis}" STREQUAL "")
message(FATAL_ERROR "failed to find pytrellis library in ${TRELLIS_ROOT}/libtrellis/")
message(FATAL_ERROR "failed to locate pytrellis library!")
endif()

list(GET found_pytrellis 0 PYTRELLIS_LIB)
get_filename_component(PYTRELLIS_LIBDIR ${PYTRELLIS_LIB} DIRECTORY)

set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py)

file(MAKE_DIRECTORY ecp5/chipdbs/)
Expand All @@ -20,9 +27,9 @@ target_compile_definitions(ecp5_chipdb PRIVATE NEXTPNR_NAMESPACE=nextpnr_${famil
target_include_directories(ecp5_chipdb PRIVATE ${family}/)

if (CMAKE_HOST_WIN32)
set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=\"${TRELLIS_ROOT}/libtrellis\;${TRELLIS_ROOT}/util/common\;${TRELLIS_ROOT}/timing/util\"")
set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=\"${PYTRELLIS_LIBDIR}\;${TRELLIS_ROOT}/util/common\;${TRELLIS_ROOT}/timing/util\"")
else()
set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=${TRELLIS_ROOT}/libtrellis:${TRELLIS_ROOT}/util/common:${TRELLIS_ROOT}/timing/util")
set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=${PYTRELLIS_LIBDIR}\:${TRELLIS_ROOT}/util/common:${TRELLIS_ROOT}/timing/util")
endif()

if (MSVC)
Expand Down

0 comments on commit 7bd4fa9

Please sign in to comment.