wlav / cppyy

Other
387 stars 39 forks source link

windows system with cmake interface #159

Closed seewolf closed 1 year ago

seewolf commented 1 year ago

I tried to build a python package with cmake interface in windows. After build the project and pip install, I tried to import it, but it looks like not fund the libCoreLegacy.dll file(just have libCoreLegacy.lib in site-packages/cppyy_backend/lib).

Previous,I added this code found in #81 to my CMakeLists.txt to make it can finish build work, because i have the similar problem with him.

set(CPPYY_LIB_SO ${PYTHON_SITE_PACKAGES}/lib)
message("CPYY_LIB_SO: " ${CPPYY_LIB_SO})

link_directories(${CPPYY_LIB_SO})

link_libraries(libCoreLegacy)

Another, it works ok in my wsl(ubuntu),and in linux dir site-packages/cppy_backend/lib,all files are *.so(like libCoreLegacy.so). I am not good in that,should i change something in FindCppyy.cmake or FindLibClang.cmake?

wlav commented 1 year ago

libCoreLegacy.dll should show up in bin, not lib under site-packages\cppyy_backend. This choice was made by upstream and since I'm not otherwise familiar with what the standard approach is (or should be) on Windows, I kept those locations the same.

seewolf commented 1 year ago

libCoreLegacy.dll should show up in bin, not lib under site-packages\cppyy_backend. This choice was made by upstream and since I'm not otherwise familiar with what the standard approach is (or should be) on Windows, I kept those locations the same.

Thanks for your help!