6 DESTINATION "${CMAKE_INSTALL_DOCDIR}/examples"
10 # ----------------------------------------------------------------------------
11 # Target: simple-x11-egl (executable)
12 # ----------------------------------------------------------------------------
14 if(waffle_on_linux AND waffle_has_x11_egl)
15 add_executable(simple-x11-egl simple-x11-egl.c)
16 target_link_libraries(simple-x11-egl ${waffle_libname})
19 # ----------------------------------------------------------------------------
20 # Target: gl_basic_nacl (executable + JSON manifest file)
21 # ----------------------------------------------------------------------------
23 add_executable(gl_basic_nacl.nexe gl_basic.c)
24 include_directories(${nacl_INCLUDE_DIRS})
26 # Set path where to create and copy required files.
27 set(nacl_example_path ${PROJECT_SOURCE_DIR}/html/gl_basic_nacl)
29 file(MAKE_DIRECTORY ${nacl_example_path})
31 set_target_properties(gl_basic_nacl.nexe
33 RUNTIME_OUTPUT_DIRECTORY ${nacl_example_path}
36 target_link_libraries(gl_basic_nacl.nexe
43 # Create .nmf file that contains JSON manifest for the .nexe required by NaCl
44 # NOTE, this serves as example only and user might need to recreate nmf file
45 # suitable for the used environment. Extra entry for libppapi_gles2.so is added
46 # because we are not linking with it but require its presence during execution.
47 # --no-arch-prefix is used because '-x' has no option to set architecture for
50 OUTPUT gl_basic_nacl.nmf
51 COMMAND ${nacl_root}/tools/create_nmf.py --no-arch-prefix -x libppapi_gles2.so:libppapi_gles2.so -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${nacl_example_path}/gl_basic_nacl.nexe -o ${nacl_example_path}/gl_basic_nacl.nmf
52 DEPENDS gl_basic_nacl.nexe
53 COMMENT "Create JSON manifest"
57 add_custom_target(gl_basic_create_json_manifest ALL
58 DEPENDS gl_basic_nacl.nmf)
60 # install index.html that loads gl_basic_nacl.nmf
61 file(INSTALL index.html DESTINATION ${nacl_example_path})
65 # ----------------------------------------------------------------------------
66 # Target: gl_basic (executable)
67 # ----------------------------------------------------------------------------
73 add_executable(gl_basic gl_basic.c)
74 target_link_libraries(gl_basic ${waffle_libname} ${GETOPT_LIBRARIES})
77 set_target_properties(gl_basic