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
CMakeModules
src
|
@ -1,9 +1,12 @@
|
||||||
|
|
||||||
macro(flightgear_component name sources)
|
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}")
|
foreach(h ${ARGV2})
|
||||||
add_library(${libName} STATIC ${sources} ${ARGV2})
|
set_property(GLOBAL
|
||||||
|
APPEND PROPERTY FG_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
||||||
set_property(GLOBAL APPEND PROPERTY FG_LIBS ${libName})
|
endforeach()
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -159,4 +159,4 @@ set(SOURCES
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
||||||
|
|
||||||
flightgear_component(JSBSim "${SOURCES}" "${HEADERS}")
|
add_library(JSBSim STATIC ${SOURCES} ${HEADERS})
|
||||||
|
|
|
@ -32,12 +32,11 @@ set(SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
flightgear_component(YASim "${SOURCES}")
|
flightgear_component(YASim "${SOURCES}")
|
||||||
|
|
||||||
add_executable(yasim yasim-test.cpp)
|
add_executable(yasim yasim-test.cpp ${SOURCES})
|
||||||
|
|
||||||
target_link_libraries(yasim
|
target_link_libraries(yasim
|
||||||
fgYASim
|
|
||||||
${SIMGEAR_CORE_LIBRARIES}
|
${SIMGEAR_CORE_LIBRARIES}
|
||||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
|
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
|
||||||
|
|
||||||
install(TARGETS yasim RUNTIME DESTINATION bin)
|
install(TARGETS yasim RUNTIME DESTINATION bin)
|
|
@ -53,7 +53,10 @@ set(HEADERS
|
||||||
viewmgr.hxx
|
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)
|
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
|
||||||
#message(STATUS "fg libs ${FG_LIBS}")
|
#message(STATUS "fg libs ${FG_LIBS}")
|
||||||
|
@ -69,8 +72,14 @@ else()
|
||||||
set(HLA_LIBRARIES "")
|
set(HLA_LIBRARIES "")
|
||||||
endif()
|
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
|
target_link_libraries(fgfs
|
||||||
${FG_LIBS}
|
|
||||||
${SIMGEAR_LIBRARIES}
|
${SIMGEAR_LIBRARIES}
|
||||||
${OPENSCENEGRAPH_LIBRARIES}
|
${OPENSCENEGRAPH_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
|
|
@ -12,7 +12,6 @@ set(SOURCES
|
||||||
generic.cxx
|
generic.cxx
|
||||||
httpd.cxx
|
httpd.cxx
|
||||||
joyclient.cxx
|
joyclient.cxx
|
||||||
jpg-httpd.cxx
|
|
||||||
jsclient.cxx
|
jsclient.cxx
|
||||||
lfsglass.cxx
|
lfsglass.cxx
|
||||||
native.cxx
|
native.cxx
|
||||||
|
@ -40,7 +39,6 @@ set(HEADERS
|
||||||
generic.hxx
|
generic.hxx
|
||||||
httpd.hxx
|
httpd.hxx
|
||||||
joyclient.hxx
|
joyclient.hxx
|
||||||
jpg-httpd.hxx
|
|
||||||
jsclient.hxx
|
jsclient.hxx
|
||||||
lfsglass.hxx
|
lfsglass.hxx
|
||||||
native.hxx
|
native.hxx
|
||||||
|
@ -55,7 +53,12 @@ set(HEADERS
|
||||||
ray.hxx
|
ray.hxx
|
||||||
rul.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}")
|
flightgear_component(Network "${SOURCES}" "${HEADERS}")
|
||||||
|
|
||||||
if(RTI_FOUND)
|
if(RTI_FOUND)
|
||||||
|
|
|
@ -28,31 +28,11 @@
|
||||||
#ifndef _FG_JPEG_HTTPD_HXX
|
#ifndef _FG_JPEG_HTTPD_HXX
|
||||||
#define _FG_JPEG_HTTPD_HXX
|
#define _FG_JPEG_HTTPD_HXX
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <simgear/io/sg_netChat.hxx>
|
#include <simgear/io/sg_netChat.hxx>
|
||||||
|
#include <simgear/screen/jpgfactory.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 "protocol.hxx"
|
#include "protocol.hxx"
|
||||||
|
|
||||||
class trJpgFactory;
|
|
||||||
|
|
||||||
|
|
||||||
/* simple httpd server that makes an hasty stab at following the http
|
/* simple httpd server that makes an hasty stab at following the http
|
||||||
1.1 rfc. */
|
1.1 rfc. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue