macro(flightgear_component name sources)
+ foreach(s ${sources})
+ set_property(GLOBAL
+ APPEND PROPERTY FG_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
+ endforeach()
- set(libName "fg${name}")
- add_library(${libName} STATIC ${sources} ${ARGV2})
-
- set_property(GLOBAL APPEND PROPERTY FG_LIBS ${libName})
-
+ foreach(h ${ARGV2})
+ set_property(GLOBAL
+ APPEND PROPERTY FG_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
+ endforeach()
endmacro()
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
-flightgear_component(JSBSim "${SOURCES}" "${HEADERS}")
+add_library(JSBSim STATIC ${SOURCES} ${HEADERS})
)
flightgear_component(YASim "${SOURCES}")
-
-add_executable(yasim yasim-test.cpp)
+
+add_executable(yasim yasim-test.cpp ${SOURCES})
target_link_libraries(yasim
- fgYASim
${SIMGEAR_CORE_LIBRARIES}
- ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
+ ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
-install(TARGETS yasim RUNTIME DESTINATION bin)
+install(TARGETS yasim RUNTIME DESTINATION bin)
\ No newline at end of file
viewmgr.hxx
)
-add_executable(fgfs ${SOURCES} ${HEADERS})
+get_property(FG_SOURCES GLOBAL PROPERTY FG_SOURCES)
+get_property(FG_HEADERS GLOBAL PROPERTY FG_HEADERS)
+
+add_executable(fgfs ${SOURCES} ${FG_SOURCES} ${FG_HEADERS} ${HEADERS})
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
#message(STATUS "fg libs ${FG_LIBS}")
set(HLA_LIBRARIES "")
endif()
+if(ENABLE_JSBSIM)
+ # FIXME - remove once JSBSim doesn't expose private headers
+ include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
+
+ target_link_libraries(fgfs JSBSim)
+endif()
+
target_link_libraries(fgfs
- ${FG_LIBS}
${SIMGEAR_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${OPENGL_LIBRARIES}
generic.cxx
httpd.cxx
joyclient.cxx
- jpg-httpd.cxx
jsclient.cxx
lfsglass.cxx
native.cxx
generic.hxx
httpd.hxx
joyclient.hxx
- jpg-httpd.hxx
jsclient.hxx
lfsglass.hxx
native.hxx
ray.hxx
rul.hxx
)
-
+
+if(FG_JPEG_SERVER)
+ list(APPEND SOURCES jpg-httpd.cxx)
+ list(APPEND HEADERS jpg-httpd.hxx)
+endif()
+
flightgear_component(Network "${SOURCES}" "${HEADERS}")
if(RTI_FOUND)
#ifndef _FG_JPEG_HTTPD_HXX
#define _FG_JPEG_HTTPD_HXX
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/io/sg_netChat.hxx>
-
-#ifdef FG_JPEG_SERVER
-# include <simgear/screen/jpgfactory.hxx>
-#else
-// dummy it in to keep the compiler happy
-class trJpgFactory {
-public:
- trJpgFactory();
- void init(int, int);
- void destroy();
- int render();
- void setFrustum(double,double,double,double,double,double);
- void *data();
-};
-#endif
+#include <simgear/screen/jpgfactory.hxx>
#include "protocol.hxx"
-class trJpgFactory;
-
/* simple httpd server that makes an hasty stab at following the http
1.1 rfc. */