Skip to content

Commit

Permalink
ship third_party libs in shogun/third_party
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed Apr 14, 2018
1 parent ec0103a commit 8ca2ee4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
6 changes: 0 additions & 6 deletions CTestConfig.cmake

This file was deleted.

8 changes: 1 addition & 7 deletions cmake/Findrxcpp.cmake
Expand Up @@ -21,10 +21,4 @@ if(NOT EXISTS "${rxcpp_INCLUDE_DIR}")
endif()

include(FindPackageHandleStandardArgs)
mark_as_advanced(rxcpp_INCLUDE_DIR)

if(EXISTS "${rxcpp_INCLUDE_DIR}")
set(rxcpp_FOUND 1)
else()
set(rxcpp_FOUND 0)
endif()
find_package_handle_standard_args(rxcpp REQUIRED_VARS rxcpp_INCLUDE_DIR)
7 changes: 4 additions & 3 deletions cmake/external/Eigen3.cmake
Expand Up @@ -7,11 +7,12 @@ ExternalProject_Add(
DOWNLOAD_DIR ${THIRD_PARTY_DIR}/Eigen3
URL https://bitbucket.org/eigen/eigen/get/${EIGEN_VERSION}.tar.bz2
URL_MD5 a7aab9f758249b86c93221ad417fbe18
CMAKE_ARGS -DEIGEN_INCLUDE_INSTALL_DIR:PATH=${EIGEN_INCLUDE_DIR}
CMAKE_ARGS -DINCLUDE_INSTALL_DIR:STRING=${EIGEN_INCLUDE_DIR}
-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}${CMAKE_DEFINITIONS}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${CMAKE_DEFINITIONS}
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE:STRING=Release
-DEIGEN_BUILD_PKGCONFIG=0
)

Expand Down
2 changes: 1 addition & 1 deletion cmake/external/rxcpp.cmake
Expand Up @@ -7,7 +7,7 @@ ExternalProject_Add(
URL_MD5 feb89934f465bb5ac513c9adce8d3b1b
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_BINARY_DIR}/src/shogun/lib/external
-DCMAKE_INSTALL_PREFIX:STRING=${THIRD_PARTY_INCLUDE_DIR}
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
BUILD_COMMAND ""
Expand Down
10 changes: 5 additions & 5 deletions src/shogun/CMakeLists.txt
Expand Up @@ -22,7 +22,7 @@ ENDIF()
OPTION(LIBSHOGUN_BUILD_STATIC "Build libshogun static library")
OPTION(DISABLE_SSE "Disable SSE and SSE2 features.")
set(INCLUDE_INSTALL_DIR include)
set(THIRD_PARTY_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib/external)
set(THIRD_PARTY_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third_party)

if (MSVC)
SET(LIBSHOGUN_BUILD_STATIC ON
Expand Down Expand Up @@ -164,15 +164,15 @@ IF(MSVC)
include(external/MSIntTypes)
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC
$<BUILD_INTERFACE:${MSINTTYPES_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include/shogun/lib/external/MSIntTypes>
$<INSTALL_INTERFACE:include/shogun/third_party/MSIntTypes>
)
ENDIF()

# bundle dirent
include(external/MSDirent)
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC
$<BUILD_INTERFACE:${MSDIRENT_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include/shogun/lib/external/MSDirent>
$<INSTALL_INTERFACE:include/shogun/third_party/MSDirent>
)

target_link_libraries(shogun PUBLIC winmm)
Expand Down Expand Up @@ -223,7 +223,7 @@ IF(NOT EIGEN3_FOUND)
include(external/Eigen3)
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC SYSTEM
$<BUILD_INTERFACE:${EIGEN_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include/shogun/lib/external/eigen>
$<INSTALL_INTERFACE:include/shogun/third_party/eigen>
)
ELSE()
# eigen3 bug related to aliasing operators and self-storing.
Expand All @@ -247,7 +247,7 @@ IF(NOT rxcpp_FOUND)
include(external/rxcpp)
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC SYSTEM
$<BUILD_INTERFACE:${rxcpp_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include/shogun/lib/external/rxcpp>
$<INSTALL_INTERFACE:include/shogun/third_party/rxcpp>
)
ELSE()
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC SYSTEM ${rxcpp_INCLUDE_DIR})
Expand Down

0 comments on commit 8ca2ee4

Please sign in to comment.