Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,22 @@ endif()
if (MULTI_STAGE_BUILD)
find_package(dpct REQUIRED)
else()
find_package(Lemon REQUIRED)
find_package(LEMON REQUIRED)
find_package(jsoncpp REQUIRED)
file(GLOB_RECURSE SOURCES src/*.cpp)
file(GLOB_RECURSE HEADERS include/*.h)
include_directories(${Lemon_INCLUDE_DIR})
include_directories(${LEMON_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/)
add_library(dpct SHARED ${SOURCES} ${HEADERS})
target_link_libraries(dpct ${Lemon_LIBRARIES} JsonCpp::JsonCpp)
target_link_libraries(dpct ${LEMON_LIBRARIES} JsonCpp::JsonCpp)

target_include_directories(dpct
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

add_library(dpct::dpct ALIAS dpct)
set_target_properties(dpct PROPERTIES
EXPORT_NAME dpct
)
Expand All @@ -70,6 +71,7 @@ else()
install(EXPORT dpctTargets
FILE dpctTargets.cmake
DESTINATION lib/cmake/dpct
NAMESPACE dpct::
)

write_basic_package_version_file(
Expand Down
2 changes: 1 addition & 1 deletion cmake/dpctConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(Lemon REQUIRED)
find_dependency(LEMON REQUIRED)
find_dependency(jsoncpp REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/dpctTargets.cmake")
21 changes: 0 additions & 21 deletions cmake_extensions/FindLemon.cmake

This file was deleted.

33 changes: 12 additions & 21 deletions conda-recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,19 @@ outputs:
- ${{ pin_subpackage("libdpct", exact=True) }}

tests:
- package_contents:
include:
- dpct/*.h
lib:
- dpct

- script:
- if: not win
then: test -d ${PREFIX}/include/dpct
else: if not exist %LIBRARY_INC%\dpct exit 1
- if: osx
then: test -f ${PREFIX}/lib/libdpct.dylib
- if: linux
then: test -f ${PREFIX}/lib/libdpct.so
- if: win
then: if not exist %LIBRARY_BIN%\dpct.dll exit 1
- if: not win
then: test -f ${PREFIX}/lib/cmake/dpct/dpctTargets.cmake
else: if not exist %LIBRARY_LIB%\cmake\dpct\dpctTargets.cmake exit 1
- if: not win
then: test -f ${PREFIX}/lib/cmake/dpct/dpctTargets-release.cmake
else: if not exist %LIBRARY_LIB%\cmake\dpct\dpctTargets-release.cmake exit 1
- if: not win
then: test -f ${PREFIX}/lib/cmake/dpct/dpctConfig.cmake
else: if not exist %LIBRARY_LIB%\cmake\dpct\dpctConfig.cmake exit 1
- if: not win
then: test -f ${PREFIX}/lib/cmake/dpct/dpctConfigVersion.cmake
else: if not exist %LIBRARY_LIB%\cmake\dpct\dpctConfigVersion.cmake exit 1
- cmake-package-check dpct --targets dpct::dpct
requirements:
run:
- cmake-package-check
- ${{ compiler("c") }}
- ${{ compiler("cxx") }}

- package:
name: dpct
Expand Down
3 changes: 1 addition & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS})
set(PYDPCT_SRCS pydpct.cpp pythongraphreader.cpp)
pybind11_add_module(dpct_python ${PYDPCT_SRCS})
set_target_properties(dpct_python PROPERTIES OUTPUT_NAME dpct)
target_link_libraries(dpct_python PRIVATE dpct)
target_include_directories(dpct_python PRIVATE ${DPCT_INCLUDE_DIR})
target_link_libraries(dpct_python PRIVATE dpct::dpct)

install(TARGETS dpct_python
LIBRARY DESTINATION ${Python_SITELIB}
Expand Down
Loading