Skip to content

Commit 3803f87

Browse files
committed
Updates
1 parent 7094b05 commit 3803f87

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dlprimitives/include)
1515

1616
message(" Pytorch libraries ${TORCH_LIBRARIES}")
1717
message(" Python libraries ${PYTHON_LIBRARIES}")
18+
message(" Python include ${PYTHON_INCLUDE_DIR}")
1819

1920
if(NOT WIN32)
2021
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall")
@@ -38,7 +39,10 @@ add_library(pt_ocl SHARED
3839
target_compile_features(pt_ocl PRIVATE cxx_std_17)
3940

4041
# Link against LibTorch
41-
target_link_libraries(pt_ocl ${TORCH_LIBRARIES} ${PYTHON_LIBRARIES} ${OCL_LIB} dlprim_core)
42+
target_link_libraries(pt_ocl ${TORCH_LIBRARIES} ${OCL_LIB} dlprim_core)
43+
if(WIN32)
44+
target_link_libraries(pt_ocl ${PYTHON_LIBRARIES})
45+
endif()
4246
set_target_properties(pt_ocl PROPERTIES PREFIX "" OUTPUT_NAME "pt_ocl")
4347
if(NOT WIN32)
4448
set_target_properties(pt_ocl PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/pytorch_ocl/")

dlprimitives

0 commit comments

Comments
 (0)