From ad636579c09d2bfab343940f06e5ff9260109821 Mon Sep 17 00:00:00 2001 From: Vincent Tavernier <vincent.tavernier@inria.fr> Date: Fri, 1 Dec 2017 14:45:13 +0100 Subject: [PATCH] Fix examples, simplify packaging --- CMakeLists.txt | 5 +---- examples/00-build/CMakeLists.txt | 5 ++--- examples/10-gradient/CMakeLists.txt | 10 ++-------- examples/50-shadertoy/CMakeLists.txt | 5 ++--- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca80590..f446509 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,10 +151,7 @@ target_compile_definitions(shadertoy PUBLIC set_property(TARGET shadertoy PROPERTY CXX_STANDARD 14) # Include directories for install -set_property(TARGET shadertoy APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES - $<BUILD_INTERFACE:${INCLUDE_DIR}> - $<INSTALL_INTERFACE:include> - $<INSTALL_INTERFACE:${Boost_INCLUDE_DIR}>) +target_include_directories(shadertoy INTERFACE $<INSTALL_INTERFACE:include>) # Set library file version set_target_properties(shadertoy PROPERTIES diff --git a/examples/00-build/CMakeLists.txt b/examples/00-build/CMakeLists.txt index 6fe914b..d456ee7 100644 --- a/examples/00-build/CMakeLists.txt +++ b/examples/00-build/CMakeLists.txt @@ -14,8 +14,7 @@ find_package(shadertoy REQUIRED) include_directories( ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} - ${glfw3_INCLUDE_DIRS} - ${shadertoy_INCLUDE_DIRS}) + ${glfw3_INCLUDE_DIRS}) add_executable(example00-build ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) @@ -24,7 +23,7 @@ target_link_libraries(example00-build ${OPENGL_LIBRARY} ${GLEW_LIBRARIES} ${glfw3_LIBRARIES} - ${shadertoy_LIBRARIES}) + shadertoy) # C++14 set_property(TARGET example00-build PROPERTY CXX_STANDARD 14) diff --git a/examples/10-gradient/CMakeLists.txt b/examples/10-gradient/CMakeLists.txt index aef0611..b08fc58 100644 --- a/examples/10-gradient/CMakeLists.txt +++ b/examples/10-gradient/CMakeLists.txt @@ -8,19 +8,13 @@ find_package(OpenGL REQUIRED) find_package(GLEW REQUIRED) pkg_search_module(glfw3 REQUIRED glfw3) -# oglplus config -set(oglplus_CONFIGURE_EXTRA_ARGS --use-glew --use-glfw3) -set(shadertoy_LOAD_OGLPLUS ON) - # libshadertoy find_package(shadertoy REQUIRED) include_directories( ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} - ${glfw3_INCLUDE_DIRS} - ${oglplus_INCLUDE_DIRS} - ${shadertoy_INCLUDE_DIRS}) + ${glfw3_INCLUDE_DIRS}) add_executable(example10-gradient ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) @@ -29,7 +23,7 @@ target_link_libraries(example10-gradient ${OPENGL_LIBRARY} ${GLEW_LIBRARIES} ${glfw3_LIBRARIES} - ${shadertoy_LIBRARIES}) + shadertoy) # C++14 set_property(TARGET example10-gradient PROPERTY CXX_STANDARD 14) diff --git a/examples/50-shadertoy/CMakeLists.txt b/examples/50-shadertoy/CMakeLists.txt index 17483ef..d0b6b4e 100644 --- a/examples/50-shadertoy/CMakeLists.txt +++ b/examples/50-shadertoy/CMakeLists.txt @@ -21,8 +21,7 @@ include_directories( ${glfw3_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} - ${jsoncpp_INCLUDE_DIRS} - ${shadertoy_INCLUDE_DIRS}) + ${jsoncpp_INCLUDE_DIRS}) add_executable(example50-shadertoy ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) @@ -34,7 +33,7 @@ target_link_libraries(example50-shadertoy ${Boost_LIBRARIES} ${CURL_LIBRARIES} ${jsoncpp_LIBRARIES} - ${shadertoy_LIBRARIES}) + shadertoy) # C++14 set_property(TARGET example50-shadertoy PROPERTY CXX_STANDARD 14) -- GitLab