Don't create intermediate static libraries for build fgfs. (Speeds up rebuilds in Xcode dramatically, possible in other IDEs too)
This commit is contained in:
parent
54d026e64f
commit
a38362646d
6 changed files with 31 additions and 37 deletions
|
@ -1,9 +1,12 @@
|
|||
|
||||
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()
|
||||
|
|
|
@ -159,4 +159,4 @@ set(SOURCES
|
|||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
||||
|
||||
flightgear_component(JSBSim "${SOURCES}" "${HEADERS}")
|
||||
add_library(JSBSim STATIC ${SOURCES} ${HEADERS})
|
||||
|
|
|
@ -33,11 +33,10 @@ set(SOURCES
|
|||
|
||||
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)
|
|
@ -53,7 +53,10 @@ set(HEADERS
|
|||
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}")
|
||||
|
@ -69,8 +72,14 @@ else()
|
|||
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}
|
||||
|
|
|
@ -12,7 +12,6 @@ set(SOURCES
|
|||
generic.cxx
|
||||
httpd.cxx
|
||||
joyclient.cxx
|
||||
jpg-httpd.cxx
|
||||
jsclient.cxx
|
||||
lfsglass.cxx
|
||||
native.cxx
|
||||
|
@ -40,7 +39,6 @@ set(HEADERS
|
|||
generic.hxx
|
||||
httpd.hxx
|
||||
joyclient.hxx
|
||||
jpg-httpd.hxx
|
||||
jsclient.hxx
|
||||
lfsglass.hxx
|
||||
native.hxx
|
||||
|
@ -56,6 +54,11 @@ set(HEADERS
|
|||
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)
|
||||
|
|
|
@ -28,31 +28,11 @@
|
|||
#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. */
|
||||
|
|
Loading…
Reference in a new issue