Skip to content

Commit f58af2c

Browse files
committed
Add option to disable glbinding-aux build (refs #361)
1 parent 4229d06 commit f58af2c

29 files changed

Lines changed: 179 additions & 60 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ option(BUILD_SHARED_LIBS "Build shared instead of static libraries.
5858
option(OPTION_SELF_CONTAINED "Create a self-contained install with all dependencies." OFF)
5959
option(OPTION_CXX_11_COMPATABILITY "Ensure build on a C++11 compiler." OFF)
6060
option(OPTION_CXX_14_COMPATABILITY "Ensure build on a C++14 compiler." OFF)
61-
option(OPTION_BUILD_TESTS "Build tests." OFF)
62-
option(OPTION_BUILD_DOCS "Build documentation." OFF)
61+
option(OPTION_BUILD_AUX "Build auxiliary library." ON)
6362
option(OPTION_BUILD_TOOLS "Build tools." ON)
6463
option(OPTION_BUILD_EXAMPLES "Build examples." ON)
64+
option(OPTION_BUILD_TESTS "Build tests." OFF)
65+
option(OPTION_BUILD_DOCS "Build documentation." OFF)
6566
option(OPTION_BUILD_WITH_BOOST_THREAD "Use boost::thread instead of std::thread." OFF)
6667
option(OPTION_BUILD_CHECK "Enable source code check targets" OFF)
6768
option(OPTION_BUILD_OWN_KHR_HEADERS "Build and deploy glbinding with in-source KHR headers." OFF)

source/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ add_subdirectory("3rdparty/KHR")
1818
# Libraries
1919
set(IDE_FOLDER "")
2020
add_subdirectory(glbinding)
21-
add_subdirectory(glbinding-aux)
21+
if (OPTION_BUILD_AUX)
22+
add_subdirectory(glbinding-aux)
23+
endif ()
2224

2325
# Tools
2426
if(OPTION_BUILD_TOOLS)

source/examples/callbacks/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ if (NOT glfw3_FOUND)
1818
message("Example ${target} skipped: glfw3 not found")
1919
return()
2020
endif()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
2125

2226
message(STATUS "Example ${target}")
2327

source/examples/comparison/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ if (NOT GLEW_FOUND)
2424
message("Example ${target} skipped: GLEW not found")
2525
return()
2626
endif()
27+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
28+
message("Example ${target} skipped: glbinding-aux not build")
29+
return()
30+
endif ()
2731

2832
message(STATUS "Example ${target}")
2933

source/examples/cubescape-gl/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ set(target cubescape-gl)
1717
if (NOT glfw3_FOUND)
1818
message("Example ${target} skipped: glfw3 not found")
1919
return()
20-
else()
21-
message(STATUS "Example ${target}")
22-
endif()
20+
endif ()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
25+
26+
message(STATUS "Example ${target}")
2327

2428

2529
#

source/examples/cubescape-gles/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ set(target cubescape-gles)
1717
if (NOT glfw3_FOUND)
1818
message("Example ${target} skipped: glfw3 not found")
1919
return()
20-
else()
21-
message(STATUS "Example ${target}")
22-
endif()
20+
endif ()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
25+
26+
message(STATUS "Example ${target}")
2327

2428

2529
#

source/examples/cubescape-glfw-gl/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ set(target cubescape-glfw-gl)
1717
if (NOT glfw3_FOUND)
1818
message("Example ${target} skipped: glfw3 not found")
1919
return()
20-
else()
21-
message(STATUS "Example ${target}")
22-
endif()
20+
endif ()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
25+
26+
message(STATUS "Example ${target}")
2327

2428

2529
#

source/examples/cubescape-glfw-gles/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ set(target cubescape-glfw-gles)
1717
if (NOT glfw3_FOUND)
1818
message("Example ${target} skipped: glfw3 not found")
1919
return()
20-
else()
21-
message(STATUS "Example ${target}")
22-
endif()
20+
endif ()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
25+
26+
message(STATUS "Example ${target}")
2327

2428

2529
#

source/examples/cubescape-gtk3-gl/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ set(target cubescape-gtk3-gl)
1717
if (NOT TARGET GTK3::GTK3)
1818
message("Example ${target} skipped: GTK 3 not found")
1919
return()
20-
else()
21-
message(STATUS "Example ${target}")
22-
endif()
20+
endif ()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
25+
26+
message(STATUS "Example ${target}")
2327

2428

2529
#

source/examples/cubescape-gtk3-gles/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ set(target cubescape-gtk3-gles)
1717
if (NOT TARGET GTK3::GTK3)
1818
message("Example ${target} skipped: GTK 3 not found")
1919
return()
20-
else()
21-
message(STATUS "Example ${target}")
22-
endif()
20+
endif ()
21+
if (NOT TARGET ${META_PROJECT_NAME}::glbinding-aux)
22+
message("Example ${target} skipped: glbinding-aux not build")
23+
return()
24+
endif ()
25+
26+
message(STATUS "Example ${target}")
2327

2428

2529
#

0 commit comments

Comments
 (0)