Browse Source

Disable building of the examples

`libzt` adds build target for its examples by default.

However, the `examples/` directory is marked as `export-ignore` in libzt's
`.gitattributes`, so it does not get included into the GitHub-provided archive.

While we use a recursive git fetch (and are not affected), distributions
may override this with `-DFETCHCONTENT_SOURCE_DIR_LIBZT=...`,
where `export-ignore` files may be omitted from the source directory.
pull/7/head
Gleb Mazovetskiy 4 years ago
parent
commit
2189052722
  1. 7
      CMakeLists.txt

7
CMakeLists.txt

@ -33,13 +33,12 @@ endif ()
if (BUILDING_WIN32 OR BUILDING_WIN64 OR MSVC)
set (BUILDING_WIN TRUE)
endif ()
if (NOT BUILDING_ANDROID AND NOT IN_XCODE)
set(SHOULD_BUILD_TESTS TRUE)
endif ()
if (BUILDING_WIN32 OR BUILDING_WIN64 OR MSVC)
set (BUILDING_WIN TRUE)
endif ()
option(BUILD_EXAMPLES "Build the examples" OFF)
# -----------------------------------------------------------------------------
# | BUILD TYPES |
# -----------------------------------------------------------------------------
@ -451,7 +450,7 @@ endif ()
# | EXECUTABLES |
# -----------------------------------------------------------------------------
if (SHOULD_BUILD_TESTS)
if (BUILD_EXAMPLES)
add_executable (earthtest ${PROJ_DIR}/examples/cpp/earthtest.cpp)
target_link_libraries(earthtest ${STATIC_LIB_NAME})
add_executable (adhoc ${PROJ_DIR}/examples/cpp/adhoc.cpp)

Loading…
Cancel
Save