diff --git a/.github/workflows/esiRuntimePublish.yml b/.github/workflows/esiRuntimePublish.yml index 2df7968e85..ead5009bd1 100644 --- a/.github/workflows/esiRuntimePublish.yml +++ b/.github/workflows/esiRuntimePublish.yml @@ -70,7 +70,7 @@ jobs: if: runner.os != 'Windows' env: CIBW_BUILD: ${{ matrix.config.cibw_build }} - CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/circt/images/pycde-build + CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/circt/images/esiruntime-wheel SETUPTOOLS_SCM_DEBUG: True run: python -m cibuildwheel --output-dir wheelhouse ./lib/Dialect/ESI/runtime diff --git a/lib/Dialect/ESI/runtime/CMakeLists.txt b/lib/Dialect/ESI/runtime/CMakeLists.txt index b81a2dc70b..1bf82fa04c 100644 --- a/lib/Dialect/ESI/runtime/CMakeLists.txt +++ b/lib/Dialect/ESI/runtime/CMakeLists.txt @@ -177,12 +177,12 @@ install(RUNTIME_DEPENDENCY_SET ESICppRuntime_RUNTIME_DEPS ) install(FILES ${ESICppRuntimeHeaders} DESTINATION include/esi - COMPONENT ESIRuntime-dev + COMPONENT ESIRuntime ) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cpp/cmake/esiaccel.cmake +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cpp/cmake/esiaccelConfig.cmake DESTINATION cmake - COMPONENT ESIRuntime-dev + COMPONENT ESIRuntime ) if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -460,5 +460,5 @@ endif() install(FILES ${ESICppRuntimeBackendHeaders} DESTINATION include/esi/backends - COMPONENT ESIRuntime-dev + COMPONENT ESIRuntime ) diff --git a/lib/Dialect/ESI/runtime/cpp/cmake/esiaccel.cmake b/lib/Dialect/ESI/runtime/cpp/cmake/esiaccel.cmake deleted file mode 100644 index c569af2663..0000000000 --- a/lib/Dialect/ESI/runtime/cpp/cmake/esiaccel.cmake +++ /dev/null @@ -1,12 +0,0 @@ -function(add_esiaccel_flags TARGET) - message("-- Adding ESI runtime flags to target ${TARGET}") - target_include_directories(${TARGET} - PUBLIC - "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../include" - ) - file(GLOB ESI_LIBS ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../lib/*) - target_link_libraries(${TARGET} - PUBLIC - ${ESI_LIBS} - ) -endfunction() diff --git a/lib/Dialect/ESI/runtime/cpp/cmake/esiaccelConfig.cmake b/lib/Dialect/ESI/runtime/cpp/cmake/esiaccelConfig.cmake new file mode 100644 index 0000000000..09eaa7269d --- /dev/null +++ b/lib/Dialect/ESI/runtime/cpp/cmake/esiaccelConfig.cmake @@ -0,0 +1,15 @@ +add_library(esiaccel::ESICppRuntime SHARED IMPORTED) +set_target_properties(esiaccel::ESICppRuntime PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" +) + +if(WIN32) + set_target_properties(esiaccel::ESICppRuntime PROPERTIES + IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../ESICppRuntime.dll" + IMPORTED_IMPLIB "${CMAKE_CURRENT_LIST_DIR}/../ESICppRuntime.lib" + ) +else() + set_target_properties(esiaccel::ESICppRuntime PROPERTIES + IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../lib/ESICppRuntime.so" + ) +endif() diff --git a/lib/Dialect/ESI/runtime/python/esiaccel/utils.py b/lib/Dialect/ESI/runtime/python/esiaccel/utils.py index 207d503bd0..c0e9d831dd 100644 --- a/lib/Dialect/ESI/runtime/python/esiaccel/utils.py +++ b/lib/Dialect/ESI/runtime/python/esiaccel/utils.py @@ -24,3 +24,7 @@ def run_esi_cosim(): cosim_import = importlib.util.module_from_spec(spec) spec.loader.exec_module(cosim_import) return cosim_import.__main__(sys.argv) + + +def get_cmake_dir(): + return _thisdir / "cmake"