CMakeLists.txt 1.46 KB
Newer Older
1
# 
2
# Copyright (c) 2015-2019 CNRS INRIA
3
# Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4
5
# 

jcarpent's avatar
jcarpent committed
6
7
8
9
# ----------------------------------------------------
# --- C++ --------------------------------------------
# ----------------------------------------------------

10
IF(LUA5_FOUND)
11
  LIST(APPEND ${PROJECT_NAME}_PARSERS_SOURCES 
12
13
      parsers/lua/lua_tables.cpp
      parsers/lua.cpp
jcarpent's avatar
jcarpent committed
14
    )
15
ENDIF(LUA5_FOUND)
jcarpent's avatar
jcarpent committed
16

17
18
19
20
SET(${PROJECT_NAME}_SOURCES
  ${${PROJECT_NAME}_PARSERS_SOURCES}
)

jcarpent's avatar
jcarpent committed
21
22
IF(UNIX)
    # Create target libpinocchio.so
23
24
25
26
27
    ADD_LIBRARY(${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES})
    SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
    IF(BUILD_WITH_COMMIT_VERSION)
      TAG_LIBRARY_VERSION(${PROJECT_NAME})
    ENDIF(BUILD_WITH_COMMIT_VERSION)
jcarpent's avatar
jcarpent committed
28
    PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
29
    TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_SERIALIZATION_LIBRARY})
30

jcarpent's avatar
jcarpent committed
31
32
33
34
35
36
37
38
    IF(URDFDOM_FOUND)
      PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} urdfdom)
    ENDIF(URDFDOM_FOUND)

    IF(HPP_FCL_FOUND)
      PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} hpp-fcl)
    ENDIF(HPP_FCL_FOUND)

39
40
41
    IF(LUA5_FOUND)
      PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} ${LUA5_PACKAGE})
    ENDIF(LUA5_FOUND)
jcarpent's avatar
jcarpent committed
42
43
44
45

    ADD_HEADER_GROUP(HEADERS)
    ADD_SOURCE_GROUP(${PROJECT_NAME}_SOURCES)

46
47
48
    INSTALL(TARGETS ${PROJECT_NAME} 
            EXPORT ${TARGETS_EXPORT_NAME}
            DESTINATION lib)
jcarpent's avatar
jcarpent committed
49
ENDIF(UNIX)
jcarpent's avatar
jcarpent committed
50