Commit c69775f8 authored by jcarpent's avatar jcarpent
Browse files

[CMake] Correct python_parser unit test build

parent 909f09ad
......@@ -140,7 +140,7 @@ MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/parsers/python")
SYMLINK_AND_INSTALL_HEADERS("${${PROJECT_NAME}_PARSER_PYTHON_HEADERS}" "")
# --- COMPILE WRAPPER
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/lib/python/${PROJECT_NAME}")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}")
SET(${PYWRAP}_SOURCES ${${PROJECT_NAME}_PYTHON_SOURCES} ${${PROJECT_NAME}_PARSER_PYTHON_SOURCES})
SET(${PYWRAP}_HEADERS ${${PROJECT_NAME}_PYTHON_HEADERS} ${${PROJECT_NAME}_PARSER_PYTHON_HEADERS})
......@@ -158,10 +158,10 @@ IF(APPLE)
ENDIF(APPLE)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bindings/python/${PROJECT_NAME}")
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bindings/python/lib")
INSTALL(FILES
"${CMAKE_BINARY_DIR}/bindings/python/${PROJECT_NAME}/bindings/${PYWRAP}.so"
"${CMAKE_BINARY_DIR}/bindings/python/lib/lib${PYWRAP}.so"
DESTINATION ${${PYWRAP}_INSTALL_DIR})
# --- INSTALL SCRIPTS
......
......@@ -93,7 +93,11 @@ IF(LUA5_1_FOUND)
ENDIF(LUA5_1_FOUND)
IF(BUILD_PYTHON_INTERFACE)
ADD_EXECUTABLE(python_parser python_parser.cpp)
IF (BUILD_UNIT_TESTS)
ADD_EXECUTABLE(python_parser python_parser.cpp)
ELSE (BUILD_UNIT_TESTS)
ADD_EXECUTABLE(python_parser EXCLUDE_FROM_ALL python_parser.cpp)
ENDIF (BUILD_UNIT_TESTS)
ADD_TEST_CFLAGS(python_parser '-DPINOCCHIO_SOURCE_DIR=\\\"${${PROJECT_NAME}_SOURCE_DIR}\\\"')
TARGET_LINK_LIBRARIES(python_parser ${PYWRAP})
TARGET_LINK_LIBRARIES(python_parser ${PYTHON_LIBRARIES})
......
Markdown is supported
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