Sfoglia il codice sorgente

Fixed up the CMake to compile the examples last, fixed vive compile

Joey Ferwerda 8 anni fa
parent
commit
8cb50ab751
3 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 2 0
      CMakeLists.txt
  2. 2 2
      examples/opengl/CMakeLists.txt
  3. 2 2
      examples/simple/CMakeLists.txt

+ 2 - 0
CMakeLists.txt

@@ -77,6 +77,8 @@ if(OPENHMD_DRIVER_HTC_VIVE)
 	set(openhmd_source_files ${openhmd_source_files}
 	${CMAKE_CURRENT_LIST_DIR}/src/drv_htc_vive/vive.c
 	${CMAKE_CURRENT_LIST_DIR}/src/drv_htc_vive/packet.c
+	#${CMAKE_CURRENT_LIST_DIR}/src/ext_deps/miniz.c
+	${CMAKE_CURRENT_LIST_DIR}/src/ext_deps/mjson.c
 	)
 	add_definitions(-DDRIVER_HTC_VIVE)
 

+ 2 - 2
examples/opengl/CMakeLists.txt

@@ -1,5 +1,5 @@
 project (openglexample)
 include_directories(${CMAKE_BINARY_DIR}/include ${SDL_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR})
 link_directories(${CMAKE_BINARY_DIR})
-link_libraries (openhmd m ${SDL_LIBRARY} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
-add_executable(openglexample gl.c main.c)
+add_executable(openglexample gl.c main.c)
+target_link_libraries(openglexample PRIVATE openhmd-shared m ${SDL_LIBRARY} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})

+ 2 - 2
examples/simple/CMakeLists.txt

@@ -1,5 +1,5 @@
 project (simple)
 include_directories(${CMAKE_BINARY_DIR}/include)
 link_directories(${CMAKE_BINARY_DIR})
-link_libraries (openhmd m)
-add_executable(simple simple.c)
+add_executable(simple simple.c)
+target_link_libraries(simple PRIVATE openhmd-shared m)