Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ad636579 authored by TAVERNIER Vincent's avatar TAVERNIER Vincent
Browse files

Fix examples, simplify packaging

parent cb10de13
No related branches found
No related tags found
No related merge requests found
...@@ -151,10 +151,7 @@ target_compile_definitions(shadertoy PUBLIC ...@@ -151,10 +151,7 @@ target_compile_definitions(shadertoy PUBLIC
set_property(TARGET shadertoy PROPERTY CXX_STANDARD 14) set_property(TARGET shadertoy PROPERTY CXX_STANDARD 14)
# Include directories for install # Include directories for install
set_property(TARGET shadertoy APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES target_include_directories(shadertoy INTERFACE $<INSTALL_INTERFACE:include>)
$<BUILD_INTERFACE:${INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${Boost_INCLUDE_DIR}>)
# Set library file version # Set library file version
set_target_properties(shadertoy PROPERTIES set_target_properties(shadertoy PROPERTIES
......
...@@ -14,8 +14,7 @@ find_package(shadertoy REQUIRED) ...@@ -14,8 +14,7 @@ find_package(shadertoy REQUIRED)
include_directories( include_directories(
${OPENGL_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS}
${glfw3_INCLUDE_DIRS} ${glfw3_INCLUDE_DIRS})
${shadertoy_INCLUDE_DIRS})
add_executable(example00-build add_executable(example00-build
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
...@@ -24,7 +23,7 @@ target_link_libraries(example00-build ...@@ -24,7 +23,7 @@ target_link_libraries(example00-build
${OPENGL_LIBRARY} ${OPENGL_LIBRARY}
${GLEW_LIBRARIES} ${GLEW_LIBRARIES}
${glfw3_LIBRARIES} ${glfw3_LIBRARIES}
${shadertoy_LIBRARIES}) shadertoy)
# C++14 # C++14
set_property(TARGET example00-build PROPERTY CXX_STANDARD 14) set_property(TARGET example00-build PROPERTY CXX_STANDARD 14)
...@@ -8,19 +8,13 @@ find_package(OpenGL REQUIRED) ...@@ -8,19 +8,13 @@ find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED) find_package(GLEW REQUIRED)
pkg_search_module(glfw3 REQUIRED glfw3) pkg_search_module(glfw3 REQUIRED glfw3)
# oglplus config
set(oglplus_CONFIGURE_EXTRA_ARGS --use-glew --use-glfw3)
set(shadertoy_LOAD_OGLPLUS ON)
# libshadertoy # libshadertoy
find_package(shadertoy REQUIRED) find_package(shadertoy REQUIRED)
include_directories( include_directories(
${OPENGL_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS}
${glfw3_INCLUDE_DIRS} ${glfw3_INCLUDE_DIRS})
${oglplus_INCLUDE_DIRS}
${shadertoy_INCLUDE_DIRS})
add_executable(example10-gradient add_executable(example10-gradient
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
...@@ -29,7 +23,7 @@ target_link_libraries(example10-gradient ...@@ -29,7 +23,7 @@ target_link_libraries(example10-gradient
${OPENGL_LIBRARY} ${OPENGL_LIBRARY}
${GLEW_LIBRARIES} ${GLEW_LIBRARIES}
${glfw3_LIBRARIES} ${glfw3_LIBRARIES}
${shadertoy_LIBRARIES}) shadertoy)
# C++14 # C++14
set_property(TARGET example10-gradient PROPERTY CXX_STANDARD 14) set_property(TARGET example10-gradient PROPERTY CXX_STANDARD 14)
...@@ -21,8 +21,7 @@ include_directories( ...@@ -21,8 +21,7 @@ include_directories(
${glfw3_INCLUDE_DIRS} ${glfw3_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS}
${jsoncpp_INCLUDE_DIRS} ${jsoncpp_INCLUDE_DIRS})
${shadertoy_INCLUDE_DIRS})
add_executable(example50-shadertoy add_executable(example50-shadertoy
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
...@@ -34,7 +33,7 @@ target_link_libraries(example50-shadertoy ...@@ -34,7 +33,7 @@ target_link_libraries(example50-shadertoy
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${CURL_LIBRARIES} ${CURL_LIBRARIES}
${jsoncpp_LIBRARIES} ${jsoncpp_LIBRARIES}
${shadertoy_LIBRARIES}) shadertoy)
# C++14 # C++14
set_property(TARGET example50-shadertoy PROPERTY CXX_STANDARD 14) set_property(TARGET example50-shadertoy PROPERTY CXX_STANDARD 14)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment