Commit 204ec087 by Chinmay Garde

Add a CMake option to toggle building extra programs.

Change-Id: I6b63d75ee2b18be92544227ff0162936f5a2328f Reviewed-on: https://swiftshader-review.googlesource.com/6910Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarChinmay Garde <chinmaygarde@google.com>
parent f241f930
...@@ -13,6 +13,8 @@ option(BUILD_GLES_CM "Build the OpenGL ES 1.1 library" 1) ...@@ -13,6 +13,8 @@ option(BUILD_GLES_CM "Build the OpenGL ES 1.1 library" 1)
option(USE_GROUP_SOURCES "Group the source files in a folder tree for visual studio" 1) option(USE_GROUP_SOURCES "Group the source files in a folder tree for visual studio" 1)
option(BUILD_EXTRA_PROGRAMS "Build extra programs" 1)
# LLVM disallows calling cmake . from the main LLVM dir, the reason is that # LLVM disallows calling cmake . from the main LLVM dir, the reason is that
# it builds header files that could overwrite the orignal ones. Here we # it builds header files that could overwrite the orignal ones. Here we
# want to include LLVM as a subdirectory and even though it wouldn't cause # want to include LLVM as a subdirectory and even though it wouldn't cause
...@@ -827,10 +829,11 @@ endif() ...@@ -827,10 +829,11 @@ endif()
# Extra programs # Extra programs
########################################################### ###########################################################
if(LINUX) if(BUILD_EXTRA_PROGRAMS)
if(LINUX)
add_executable(OGLES2HelloAPI ${HELLO2_DIR}/OGLES2HelloAPI_LinuxX11.cpp) add_executable(OGLES2HelloAPI ${HELLO2_DIR}/OGLES2HelloAPI_LinuxX11.cpp)
target_link_libraries(OGLES2HelloAPI dl X11 EGL GLESv2) target_link_libraries(OGLES2HelloAPI dl X11 EGL GLESv2)
elseif(APPLE) elseif(APPLE)
add_executable(OGLES2HelloAPI MACOSX_BUNDLE add_executable(OGLES2HelloAPI MACOSX_BUNDLE
${HELLO2_DIR}/OGLES2HelloAPI_OSX.mm ${HELLO2_DIR}/OGLES2HelloAPI_OSX.mm
${HELLO2_DIR}/Build/OSX/en.lproj/MainMenu.xib ${HELLO2_DIR}/Build/OSX/en.lproj/MainMenu.xib
...@@ -844,4 +847,5 @@ elseif(APPLE) ...@@ -844,4 +847,5 @@ elseif(APPLE)
set_source_files_properties(${HELLO2_DIR}/Build/OSX/en.lproj/MainMenu.xib PROPERTIES set_source_files_properties(${HELLO2_DIR}/Build/OSX/en.lproj/MainMenu.xib PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources" MACOSX_PACKAGE_LOCATION "Resources"
) )
endif()
endif() endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment