Commit ab86fdb0 authored by Antonio El Khoury's avatar Antonio El Khoury
Browse files

[CMake] Build library only if sources are detected.

parent e3331628
...@@ -48,11 +48,12 @@ IF(LUA5_1_FOUND) ...@@ -48,11 +48,12 @@ IF(LUA5_1_FOUND)
multibody/parser/lua/lua_tables.cpp multibody/parser/lua/lua_tables.cpp
multibody/parser/lua.cpp multibody/parser/lua.cpp
) )
SET(BUILD_MAIN_LIBRARY True)
ENDIF(LUA5_1_FOUND) ENDIF(LUA5_1_FOUND)
SET(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_MULTIBODY_PARSER_LUA_SOURCES}) SET(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_MULTIBODY_PARSER_LUA_SOURCES})
IF (UNIX ) IF (UNIX AND BUILD_MAIN_LIBRARY)
# Create target libpinocchio.so # Create target libpinocchio.so
ADD_LIBRARY ( ${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES} ) ADD_LIBRARY ( ${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES} )
SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment