]> git.mxchange.org Git - simgear.git/commitdiff
Include ShivaVG into libSimGearScene
authorThomas Geymayer <tomgey@gmail.com>
Sun, 4 Nov 2012 19:00:53 +0000 (20:00 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Sun, 4 Nov 2012 19:00:53 +0000 (20:00 +0100)
CMakeLists.txt
simgear/canvas/ShivaVG/src/CMakeLists.txt

index 25f73047b68145d1cdfbb25ee31ee3e034c5b209..4ab12878b42c36450012aa9ed331903ca9b25f81 100644 (file)
@@ -185,11 +185,17 @@ else()
     add_definitions(-DHAVE_EXPAT_CONFIG_H)
 endif(SYSTEM_EXPAT)
 
+check_include_file(inttypes.h HAVE_INTTYPES_H)
 check_include_file(sys/time.h HAVE_SYS_TIME_H)
 check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
 check_include_file(unistd.h HAVE_UNISTD_H)
 check_include_file(windows.h HAVE_WINDOWS_H)
 
+if(HAVE_INTTYPES_H)
+  # ShivaVG needs inttypes.h
+  add_definitions(-DHAVE_INTTYPES_H)
+endif()
+
 if(ENABLE_RTI)
     # See if we have any rti library variant installed
     message(STATUS "RTI: ENABLED")
index 7b9bc78500afdaaee388244ee10cdf237c8c9710..1e36635c4114688cc39393b6757115ed34416d40 100644 (file)
@@ -1,20 +1,8 @@
-include(CheckIncludeFile)
-check_include_file("inttypes.h" HAVE_INTTYPES_H)
+include(SimGearComponent)
 
-if(HAVE_INTTYPES_H)
-  add_definitions(-DHAVE_INTTYPES_H)
-endif()
-add_definitions(-DVG_API_EXPORT)
+#add_definitions(-DVG_API_EXPORT)
 
-INCLUDE_DIRECTORIES(
-  ${OPENGL_INCLUDE_DIR}
-  ../include
-)
-
-SET(INCROOT ../include/VG)
-SET(SRCROOT .)
-
-SET(ShivaVG_Src
+set(ShivaVG_Src
     ${SRCROOT}/shArrays.c
     ${SRCROOT}/shArrays.h
     ${SRCROOT}/shContext.c
@@ -36,17 +24,4 @@ SET(ShivaVG_Src
     ${SRCROOT}/shVgu.c
 )
 
-ADD_LIBRARY(
-    ShivaVG
-    ${ShivaVG_Src}
-)
-
-TARGET_LINK_LIBRARIES(
-    ShivaVG
-    ${OPENGL_gl_LIBRARY}
-    ${OPENGL_glu_LIBRARY}
-)
-
-if(NOT SIMGEAR_HEADLESS)
-  install(TARGETS ShivaVG ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-endif()
\ No newline at end of file
+simgear_scene_component(ShivaVG canvas/ShivaVG "${ShivaVG_Src}" "")
\ No newline at end of file