Skip to content

Commit

Permalink
Move libmexclass install steps to ExternalProject_Add INSTALL_COMMAND.
Browse files Browse the repository at this point in the history
Also revert previous fix for Issue #25.
  • Loading branch information
sreeharihegden committed Mar 8, 2023
1 parent def6862 commit c7f4424
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ cmake --build build --config Release --target install

```matlab
CMAKE_INSTALL_PREFIX = fullfile("<cmake-install-prefix>");
addpath(fullfile(CMAKE_INSTALL_PREFIX, "libmexclassInstall"));
addpath(fullfile(CMAKE_INSTALL_PREFIX, "libmexclass"));
LIBMEXCLASS_SOURCE_DIR = fullfile("<libmexclass-source-dir>");
addpath(fullfile(LIBMEXCLASS_SOURCE_DIR, "example", "matlab"));
Expand Down
6 changes: 5 additions & 1 deletion libmexclass/cpp/libmexclassInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ if(WIN32)
set(ACTUAL_BINARY_DIR "${ACTUAL_BINARY_DIR}/Release/")
list(APPEND INSTALL_BINARIES_LIST ${ACTUAL_BINARY_DIR}/gateway.mexw64 ${ACTUAL_BINARY_DIR}/mexclass.dll)
elseif(APPLE)
<<<<<<< HEAD
list(APPEND INSTALL_BINARIES_LIST ${ACTUAL_BINARY_DIR}/gateway.mexmaci64 ${ACTUAL_BINARY_DIR}/libmexclass.dylib)
=======
list(APPEND INSTALL_BINARIES_LIST ${ACTUAL_BINARY_DIR}/gateway.mexmaci64 ${ACTUAL_BINARY_DIR}/libmexclass.so)
>>>>>>> Move libmexclass install steps to ExternalProject_Add INSTALL_COMMAND.
elseif(UNIX AND NOT APPLE AND NOT CYGWIN)
list(APPEND INSTALL_BINARIES_LIST ${ACTUAL_BINARY_DIR}/gateway.mexa64 ${ACTUAL_BINARY_DIR}/libmexclass.so)
endif()
Expand All @@ -28,4 +32,4 @@ message(STATUS "Copying libmexclass binaries from ACTUAL_BINARY_DIR to packaged
file(COPY ${INSTALL_BINARIES_LIST} DESTINATION ${CMAKE_PACKAGED_LIBMEXCLASS_INSTALL_DIR}/+proxy/)

message(STATUS "Copying CMAKE_PACKAGED_LIBMEXCLASS_INSTALL_DIR to client's CMAKE_INSTALL_DIR: ${CMAKE_INSTALL_DIR}...")
file(COPY ${CMAKE_PACKAGED_LIBMEXCLASS_INSTALL_DIR} DESTINATION ${CMAKE_INSTALL_DIR}/)
file(COPY ${CMAKE_PACKAGED_LIBMEXCLASS_INSTALL_DIR} DESTINATION ${CMAKE_INSTALL_DIR}/)

0 comments on commit c7f4424

Please sign in to comment.