mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 05:35:08 +08:00
59795e2a8e
* add shogun 6.1.3 * [shogun] Add additional dependencies, force static linking
74 lines
2.8 KiB
Diff
74 lines
2.8 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 6c48bed..6f97c8b 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -60,8 +60,8 @@ SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC)
|
|
IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
|
|
- SET(CMAKE_C_FLAGS "")
|
|
- SET(CMAKE_CXX_FLAGS "")
|
|
+# SET(CMAKE_C_FLAGS "")
|
|
+# SET(CMAKE_CXX_FLAGS "")
|
|
ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
|
|
|
|
# CCACHE
|
|
@@ -184,12 +184,12 @@ SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g")
|
|
SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}")
|
|
SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}")
|
|
IF(MSVC)
|
|
- SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
|
|
- SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
|
|
- SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot")
|
|
- SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot")
|
|
- SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi")
|
|
- SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi")
|
|
+ # SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
|
|
+ # SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
|
|
+ # SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot")
|
|
+ # SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot")
|
|
+ # SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi")
|
|
+ # SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi")
|
|
add_compile_options("/bigobj")
|
|
ELSE()
|
|
SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
|
|
diff --git a/cmake/version.cmake b/cmake/version.cmake
|
|
index fbca111..f6847f7 100644
|
|
--- a/cmake/version.cmake
|
|
+++ b/cmake/version.cmake
|
|
@@ -5,7 +5,7 @@ SET(MAINVERSION ${VERSION})
|
|
|
|
SET(EXTRA "")
|
|
|
|
-IF(EXISTS "${ROOT_DIR}/.git/")
|
|
+IF(EXISTS "${ROOT_DIR}/.git/" AND FALSE)
|
|
FIND_PACKAGE(Git QUIET)
|
|
IF (NOT GIT_FOUND)
|
|
MESSAGE(FATAL_ERROR "The source is checked out from a git repository, but cannot find git executable!")
|
|
diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt
|
|
index 9e79786..fd76961 100644
|
|
--- a/src/shogun/CMakeLists.txt
|
|
+++ b/src/shogun/CMakeLists.txt
|
|
@@ -145,7 +145,7 @@ endif()
|
|
# add target for static library if enabled
|
|
if (LIBSHOGUN_BUILD_STATIC)
|
|
add_library(shogun-static STATIC $<TARGET_OBJECTS:libshogun> ${CMAKE_CURRENT_BINARY_DIR}/lib/config.h)
|
|
- set_property(TARGET shogun-static PROPERTY OUTPUT_NAME shogun)
|
|
+ set_property(TARGET shogun-static PROPERTY OUTPUT_NAME libshogun)
|
|
target_include_directories(shogun-static PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
|
|
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
|
@@ -492,10 +492,12 @@ ELSE()
|
|
ENDIF()
|
|
|
|
# set the desidered targets to be installed
|
|
+if(NOT INSTALL_TARGETS)
|
|
set(INSTALL_TARGETS shogun)
|
|
if (LIBSHOGUN_BUILD_STATIC)
|
|
LIST(APPEND INSTALL_TARGETS shogun-static)
|
|
endif()
|
|
+endif()
|
|
|
|
INSTALL(
|
|
TARGETS ${INSTALL_TARGETS}
|