Changes to build simuv2.1 with Cmake

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2695 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: b8be24b93d5d07028ca447e29207f7b8fbb8bbac
Former-commit-id: 045513738396e67b0338fd6e3e66218081a97965
This commit is contained in:
kakukri 2010-08-23 18:21:44 +00:00
parent e69f3ca38a
commit 42a656e407
2 changed files with 22 additions and 20 deletions

View file

@ -1,26 +1,28 @@
ADD_SUBDIRECTORY(SOLID-2.0)
##ADD_SUBDIRECTORY(SOLID-2.0)
INCLUDE(../../../../cmake/macros.cmake)
ADD_TORCSLIB_INCLUDEDIR(portability)
#SOLID-source: it doesn't do the subdirectory first
SET(SOLID_SOURCES SOLID-2.0/src/Transform.cpp SOLID-2.0/src/Convex.cpp
SOLID-2.0/src/Box.cpp SOLID-2.0/src/Cone.cpp SOLID-2.0/src/Cylinder.cpp
SOLID-2.0/src/Sphere.cpp SOLID-2.0/src/Simplex.cpp
SOLID-2.0/src/Polygon.cpp SOLID-2.0/src/Polyhedron.cpp
SOLID-2.0/src/Complex.cpp SOLID-2.0/src/BBoxTree.cpp
SOLID-2.0/src/Endpoint.cpp SOLID-2.0/src/Object.cpp
SOLID-2.0/src/Response.cpp SOLID-2.0/src/RespTable.cpp
SOLID-2.0/src/C-api.cpp)
##Solid commented out while we have simuv2 and simuv2.1 parallel
##Uncomment it when removing simuv2!
##SET(SOLID_SOURCES SOLID-2.0/src/Transform.cpp SOLID-2.0/src/Convex.cpp
## SOLID-2.0/src/Box.cpp SOLID-2.0/src/Cone.cpp SOLID-2.0/src/Cylinder.cpp
## SOLID-2.0/src/Sphere.cpp SOLID-2.0/src/Simplex.cpp
## SOLID-2.0/src/Polygon.cpp SOLID-2.0/src/Polyhedron.cpp
## SOLID-2.0/src/Complex.cpp SOLID-2.0/src/BBoxTree.cpp
## SOLID-2.0/src/Endpoint.cpp SOLID-2.0/src/Object.cpp
## SOLID-2.0/src/Response.cpp SOLID-2.0/src/RespTable.cpp
## SOLID-2.0/src/C-api.cpp)
INCLUDE_DIRECTORIES(SOLID-2.0/include)
IF(UNIX)
ADD_LIBRARY(SOLID-2.0/src/libsolid ${SOLID_SOURCES})
SET_TARGET_PROPERTIES(SOLID-2.0/src/libsolid PROPERTIES PREFIX ""
COMPILE_FLAGS -fPIC)
ENDIF(UNIX)
##IF(UNIX)
## ADD_LIBRARY(SOLID-2.0/src/libsolid ${SOLID_SOURCES})
## SET_TARGET_PROPERTIES(SOLID-2.0/src/libsolid PROPERTIES PREFIX ""
## COMPILE_FLAGS -fPIC)
##ENDIF(UNIX)
#ELSE(UNIX)
# ADD_LIBRARY(SOLID-2.0/src/solid ${SOLID_SOURCES})
@ -28,7 +30,7 @@ ENDIF(UNIX)
#ENDIF(UNIX)
SET(SIMUV2_SOURCES aero.cpp axle.cpp brake.cpp car.cpp categories.cpp
SET(SIMUV2.1_SOURCES aero.cpp axle.cpp brake.cpp car.cpp categories.cpp
collide.cpp differential.cpp engine.cpp simu.cpp simuitf.cpp
steer.cpp susp.cpp transmission.cpp wheel.cpp
aero.h axle.h brake.h carstruct.h differential.h engine.h
@ -42,16 +44,16 @@ ADD_TORCSLIB_INCLUDEDIR(math tgf robottools)
INCLUDE_DIRECTORIES(SOLID-2.0/include)
IF(WIN32)
ADD_LIBRARY(simuv2 SHARED ${SIMUV2_SOURCES} simuv2.def)
ADD_LIBRARY(simuv2.1 SHARED ${SIMUV2.1_SOURCES} simuv2.1.def)
ELSE(WIN32)
ADD_LIBRARY(simuv2 SHARED ${SIMUV2_SOURCES})
ADD_LIBRARY(simuv2.1 SHARED ${SIMUV2.1_SOURCES})
ENDIF(WIN32)
IF(UNIX)
SET_TARGET_PROPERTIES(simuv2 PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(simuv2.1 PROPERTIES PREFIX "")
ENDIF(UNIX)
ADD_TORCSLIB_LIBRARY(simuv2 tgf robottools solid)
ADD_TORCSLIB_LIBRARY(simuv2.1 tgf robottools solid)
TORCS_INSTALL_FILES(LIB modules/simu TARGETS simuv2)
TORCS_INSTALL_FILES(LIB modules/simu TARGETS simuv2.1)