]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/CMakeLists.txt
FGPUIDialog: fix reading from already free'd memory.
[flightgear.git] / src / FDM / YASim / CMakeLists.txt
index d129acef286d3f7f7ecf35b84933b02db0eb0743..352a78b09bfff709dc235dd4e2294952c1761e6d 100644 (file)
@@ -1,11 +1,10 @@
 include(FlightGearComponent)
 
-set(SOURCES
-    Airplane.cpp
+set(COMMON
+       Airplane.cpp
        Atmosphere.cpp
        ControlMap.cpp
        FGFDM.cpp
-       FGGround.cpp
        Gear.cpp
        Glue.cpp
        Ground.cpp
@@ -14,7 +13,6 @@ set(SOURCES
        Integrator.cpp
        Jet.cpp
        Launchbar.cpp
-       Math.cpp
        Model.cpp
        PistonEngine.cpp
        PropEngine.cpp
@@ -28,18 +26,29 @@ set(SOURCES
        TurbineEngine.cpp
        Turbulence.cpp
        Wing.cpp
+       )
+
+set(SOURCES
+       ${COMMON}
        YASim.cxx
-    )
+       FGGround.cpp
+       )
+
+flightgear_component(YASim  "${SOURCES}")
+
+if(ENABLE_TESTS)
+add_executable(yasim yasim-test.cpp ${COMMON})
+add_executable(yasim-proptest proptest.cpp ${COMMON})
+
+target_link_libraries(yasim
+               ${SIMGEAR_CORE_LIBRARIES}
+               ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
 
-flightgear_component(YASim "${SOURCES}")
-    
-add_executable(yasim yasim-test.cpp)
+target_link_libraries(yasim-proptest
+               ${SIMGEAR_CORE_LIBRARIES}
+               ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
 
-target_link_libraries(yasim 
-       fgYASim
-       ${SIMGEAR_CORE_LIBRARIES}
-        ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
+install(TARGETS yasim yasim-proptest RUNTIME DESTINATION bin)
 
-install(TARGETS yasim RUNTIME DESTINATION bin)
-       
+endif(ENABLE_TESTS)