diff --git a/egl_probe/CMakeLists.txt b/egl_probe/CMakeLists.txt index a59f358..70593b6 100644 --- a/egl_probe/CMakeLists.txt +++ b/egl_probe/CMakeLists.txt @@ -7,5 +7,12 @@ add_definitions(-DUSE_GLAD) add_executable(query_devices glad/egl.cpp glad/gl.cpp query_devices.cpp) add_executable(test_device glad/egl.cpp glad/gl.cpp test_device.cpp) -target_link_libraries(query_devices dl pthread) -target_link_libraries(test_device dl pthread) \ No newline at end of file + +IF(WIN32) + SET(PLATFORM_LIBS) +ELSE(WIN32) + SET(PLATFORM_LIBS dl pthread) +ENDIF(WIN32) + +target_link_libraries(query_devices ${PLATFORM_LIBS}) +target_link_libraries(test_device ${PLATFORM_LIBS}) \ No newline at end of file diff --git a/egl_probe/query_devices.cpp b/egl_probe/query_devices.cpp index d62e509..a21c823 100644 --- a/egl_probe/query_devices.cpp +++ b/egl_probe/query_devices.cpp @@ -7,7 +7,9 @@ #include #include #include -#include +#ifndef _WIN32 + #include +#endif #ifdef USE_GLAD #include diff --git a/egl_probe/test_device.cpp b/egl_probe/test_device.cpp index 9dc6102..6c85a5e 100644 --- a/egl_probe/test_device.cpp +++ b/egl_probe/test_device.cpp @@ -7,7 +7,9 @@ #include #include #include -#include +#ifndef _WIN32 + #include +#endif #ifdef USE_GLAD #include diff --git a/setup.py b/setup.py index 9722581..145469a 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,8 @@ def build_extension(self, ext): os.mkdir(build_dir) # build using cmake - subprocess.check_call("cmake ..; make -j", cwd=build_dir, shell=True) + subprocess.check_call("cmake -S .. -B .", cwd=build_dir, shell=True) + subprocess.check_call("cmake --build .", cwd=build_dir, shell=True) if sys.version_info.major == 3: