-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add waves #541
Merged
Merged
Add waves #541
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e5cba63
add waves
iche033 e3bbbf4
style
iche033 69a1a3a
Merge branch 'ign-rendering6' into waves
iche033 307e90a
add link to nvidia water simulation page
iche033 0b23244
Merge branch 'waves' of github.com:ignitionrobotics/ign-rendering int…
iche033 56309b1
add missing example config hh file
iche033 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) | ||
project(ignition-rendering-waves) | ||
|
||
include_directories(SYSTEM | ||
${PROJECT_BINARY_DIR} | ||
) | ||
|
||
find_package(ignition-rendering6) | ||
|
||
set(TARGET_THIRD_PARTY_DEPENDS "") | ||
|
||
if (APPLE OR UNIX) | ||
find_package(GLUT REQUIRED) | ||
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS}) | ||
link_directories(${GLUT_LIBRARY_DIRS}) | ||
|
||
find_package(OpenGL REQUIRED) | ||
include_directories(SYSTEM ${OpenGL_INCLUDE_DIRS}) | ||
link_directories(${OpenGL_LIBRARY_DIRS}) | ||
set(TARGET_THIRD_PARTY_DEPENDS | ||
${TARGET_THIRD_PARTY_DEPENDS} | ||
${OPENGL_LIBRARIES} | ||
${GLUT_LIBRARIES} | ||
) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") | ||
endif() | ||
|
||
if (NOT APPLE) | ||
find_package(GLEW REQUIRED) | ||
if (WIN32) | ||
set(TARGET_THIRD_PARTY_DEPENDS | ||
${TARGET_THIRD_PARTY_DEPENDS} | ||
GLEW::glew | ||
) | ||
else () | ||
set(TARGET_THIRD_PARTY_DEPENDS | ||
${TARGET_THIRD_PARTY_DEPENDS} | ||
GLEW | ||
) | ||
endif() | ||
endif() | ||
|
||
configure_file (example_config.hh.in ${PROJECT_BINARY_DIR}/example_config.hh) | ||
|
||
if (WIN32) | ||
find_package(FreeGLUT REQUIRED) | ||
set(TARGET_THIRD_PARTY_DEPENDS ${TARGET_THIRD_PARTY_DEPENDS} FreeGLUT::freeglut) | ||
endif() | ||
|
||
add_executable(waves Main.cc GlutWindow.cc) | ||
|
||
target_link_libraries(waves | ||
${IGNITION-RENDERING_LIBRARIES} | ||
${TARGET_THIRD_PARTY_DEPENDS} | ||
) | ||
|
||
if (WIN32) | ||
set_target_properties(waves | ||
PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${PROJECT_BINARY_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${PROJECT_BINARY_DIR} | ||
) | ||
endif() | ||
|
||
add_custom_command(TARGET waves POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_SOURCE_DIR}/media | ||
$<TARGET_FILE_DIR:waves>/media) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a compilation error from missing the
example_config.hh.in
in the waves example directory and I fixed it temporarily by just taking the file from the other examples.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, added file in 56309b1