Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/openvr/src/src/CMakeLists.txt

Issue 2754253003: Add OpenVR SDK to third_party (Closed)
Patch Set: feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/openvr/src/headers/openvr_driver.h ('k') | third_party/openvr/src/src/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/openvr/src/src/CMakeLists.txt
diff --git a/third_party/openvr/src/src/CMakeLists.txt b/third_party/openvr/src/src/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7e192c51bfa53cc951114576bcb7257ca6d1170a
--- /dev/null
+++ b/third_party/openvr/src/src/CMakeLists.txt
@@ -0,0 +1,74 @@
+# Project name.
+project(openvr_api)
+
+set( LIBNAME "openvr_api" )
+
+# Set some properies for specific files.
+if(APPLE)
+ set(CMAKE_MACOSX_RPATH 0)
+ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ set_source_files_properties(vrcommon/pathtools_public.cpp vrcommon/vrpathregistry_public.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
+ endif()
+ if(BUILD_SHARED)
+ find_library(FOUNDATION_FRAMEWORK Foundation)
+ mark_as_advanced(FOUNDATION_FRAMEWORK)
+ set(EXTRA_LIBS ${EXTRA_LIBS} ${FOUNDATION_FRAMEWORK})
+ endif(BUILD_SHARED)
+elseif(WIN32)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ add_definitions( -DWIN64 )
+ set( LIBNAME "openvr_api64" )
+ endif()
+endif()
+
+# Add include folders.
+include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/headers ${CMAKE_SOURCE_DIR}/src/vrcommon)
+
+if(USE_CUSTOM_LIBCXX)
+ link_directories(
+ ${LIBCXX_LIB_DIR}
+ )
+endif()
+
+# Set the source group and files.
+set(CORE_FILES
+ openvr_api_public.cpp
+ jsoncpp.cpp
+)
+set(VRCOMMON_FILES
+ vrcommon/dirtools_public.cpp
+ vrcommon/envvartools_public.cpp
+ vrcommon/pathtools_public.cpp
+ vrcommon/sharedlibtools_public.cpp
+ vrcommon/hmderrors_public.cpp
+ vrcommon/vrpathregistry_public.cpp
+ vrcommon/strtools_public.cpp
+)
+
+set(SOURCE_FILES
+ ${CORE_FILES}
+ ${VRCOMMON_FILES}
+)
+
+source_group("Src" FILES
+ ${CORE_FILES}
+)
+
+source_group("VRCommon" FILES
+ ${VRCOMMON_FILES}
+)
+
+# Build the library.
+if(BUILD_SHARED)
+ add_library(${LIBNAME} SHARED ${SOURCE_FILES})
+else()
+ add_library(${LIBNAME} STATIC ${SOURCE_FILES})
+endif()
+
+if(USE_CUSTOM_LIBCXX)
+ set(EXTRA_LIBS ${EXTRA_LIBS} c++ c++abi)
+endif()
+
+target_link_libraries(${LIBNAME} ${EXTRA_LIBS})
+
+install(TARGETS ${LIBNAME} DESTINATION lib)
« no previous file with comments | « third_party/openvr/src/headers/openvr_driver.h ('k') | third_party/openvr/src/src/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698