diff --git a/.github/workflows/ubuntu-cpu.yml b/.github/workflows/ubuntu-cpu.yml index 9c69ce7..fab6218 100644 --- a/.github/workflows/ubuntu-cpu.yml +++ b/.github/workflows/ubuntu-cpu.yml @@ -87,7 +87,8 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=$(which ccache) \ -DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ -DCMAKE_PREFIX_PATH=${{ github.workspace }}/libtorch \ - -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install + -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install \ + -DOPENSPLAT_BUILD_SIMPLE_TRAINER=ON ninja - name: Clean Compiler Cache diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e5f4b8..7187429 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,9 @@ add_executable(opensplat opensplat.cpp point_io.cpp nerfstudio.cpp model.cpp kdt set_property(TARGET opensplat PROPERTY CXX_STANDARD 17) target_include_directories(opensplat PRIVATE ${PROJECT_SOURCE_DIR}/vendor/glm ${GPU_INCLUDE_DIRS}) target_link_libraries(opensplat PUBLIC ${STDPPFS_LIBRARY} ${GPU_LIBRARIES} ${GSPLAT_LIBS} ${TORCH_LIBRARIES} ${OpenCV_LIBS}) +if (NOT WIN32) + target_link_libraries(opensplat PUBLIC pthread) +endif() if(GPU_RUNTIME STREQUAL "HIP") target_compile_definitions(opensplat PRIVATE USE_HIP __HIP_PLATFORM_AMD__) elseif(GPU_RUNTIME STREQUAL "CUDA") @@ -96,6 +99,9 @@ if(OPENSPLAT_BUILD_SIMPLE_TRAINER) add_executable(simple_trainer simple_trainer.cpp project_gaussians.cpp rasterize_gaussians.cpp cv_utils.cpp) target_include_directories(simple_trainer PRIVATE ${PROJECT_SOURCE_DIR}/vendor/glm ${GPU_INCLUDE_DIRS}) target_link_libraries(simple_trainer PUBLIC ${GPU_LIBRARIES} ${GSPLAT_LIBS} ${TORCH_LIBRARIES} ${OpenCV_LIBS}) + if (NOT WIN32) + target_link_libraries(opensplat PUBLIC pthread) + endif() set_property(TARGET simple_trainer PROPERTY CXX_STANDARD 17) if(GPU_RUNTIME STREQUAL "HIP") target_compile_definitions(simple_trainer PRIVATE USE_HIP __HIP_PLATFORM_AMD__)