Skip to content

Commit

Permalink
fix: build demo3d on osx
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed Oct 31, 2023
1 parent 71e3c75 commit dab0861
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion test/system_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ project(
)

add_subdirectory(demo2d)
# add_subdirectory(demo3d)
add_subdirectory(demo3d)
# add_subdirectory(demo_old)
33 changes: 18 additions & 15 deletions test/system_test/demo3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,31 @@ add_executable(demo3d
dtkScene.cpp
)

target_include_directories(demo3d PRIVATE
./
../
../engine/dtk
../engine/math
../engine/physics
target_include_directories(${PROJECT_NAME} PRIVATE
include
)

target_link_libraries(demo3d PRIVATE
dtk
Boost::headers
Boost::dynamic_linking
CGAL
target_link_libraries(${PROJECT_NAME} PRIVATE
Eigen
GLUT::GLUT
glfw
glm
Eigen
OpenGL::GL
glut
GLU
)

# target_link_libraries(demo3d PRIVATE
# dtk
# Boost::headers
# Boost::dynamic_linking
# CGAL
# GLUT::GLUT
# glfw
# glm
# Eigen
# OpenGL::GL
# glut
# GLU
# )

target_compile_definitions(demo3d PRIVATE
# $<VTK_OPT:USE_VTK>
)
Expand Down
4 changes: 2 additions & 2 deletions test/system_test/demo3d/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void keyboard(unsigned char key, int x, int y) {
break;
}
case 27:
glutLeaveMainLoop();
// glutLeaveMainLoop();
break;
default:
break;
Expand All @@ -215,7 +215,7 @@ void gl_vis(int argc, char* argv[])
glutDisplayFunc(&display);
glutReshapeFunc(&reshape);
glutIdleFunc(&idle);
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION);
// glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION);
glutMainLoop();
}

Expand Down

0 comments on commit dab0861

Please sign in to comment.