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")
-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
${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