Skip to content

Commit

Permalink
[CMake] put python header in include
Browse files Browse the repository at this point in the history
Otherwise, this header is installed if BUILD_PYTHON_INTERFACE, and not
if INSTALL_PYTHON_INTERFACE_ONLY.

But if we want to be able to have binary packages for:
- the main curve package
- its bindings for python 2
- its bindings for python 3

this header will be installed in the 2 last cases, which will conflict.

In short: if we set INSTALL_PYTHON_INTERFACE_ONLY, there should be only
stuff installed in PYTHON_SITELIB.
  • Loading branch information
nim65s committed Feb 13, 2020
1 parent c89ae70 commit 513980d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions include/curves/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ INSTALL(FILES

ADD_SUBDIRECTORY(helpers)
ADD_SUBDIRECTORY(optimization)
ADD_SUBDIRECTORY(python)
ADD_SUBDIRECTORY(serialization)
8 changes: 8 additions & 0 deletions include/curves/python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SET(${PROJECT_NAME}_PYTHON_HEADERS
python_definitions.h
)

INSTALL(FILES
${${PROJECT_NAME}_PYTHON_HEADERS}
DESTINATION include/${PROJECT_NAME}/python
)
File renamed without changes.
9 changes: 0 additions & 9 deletions python/curves/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ SET(${PY_NAME}_BINDINGS_SOURCES
namespace.h
)

SET(${PROJECT_NAME}_PYTHON_HEADERS
python_definitions.h
)

INSTALL(FILES
${${PROJECT_NAME}_PYTHON_HEADERS}
DESTINATION include/${PROJECT_NAME}/python
)

ADD_LIBRARY(${PY_NAME} SHARED ${${PY_NAME}_BINDINGS_SOURCES})
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES PREFIX "")
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-conversion")
Expand Down
2 changes: 1 addition & 1 deletion python/curves/python_variables.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "python_variables.h"
#include "python_definitions.h"
#include "curves/python/python_definitions.h"

#include <Eigen/Core>

Expand Down
2 changes: 1 addition & 1 deletion python/curves/python_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "curves/piecewise_curve.h"
#include "curves/so3_linear.h"
#include "curves/se3_curve.h"
#include "python_definitions.h"
#include "curves/python/python_definitions.h"
#include <eigenpy/memory.hpp>
#include <eigenpy/eigenpy.hpp>
#include <eigenpy/geometry.hpp>
Expand Down

0 comments on commit 513980d

Please sign in to comment.