mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-13 11:39:02 +08:00
68447ced17
* Add libgo library packge * [libgo] Fix Windows and adjust cmake usage information
39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0d291e4..0f6cc38 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -158,7 +158,7 @@ if (UNIX)
|
|
set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS} -Werror")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS} -Werror")
|
|
-else ()
|
|
+elseif (NOT DISABLE_ADJUST_COMMAND_LINE_FLAGS)
|
|
if (NOT DISABLE_DYNAMIC_LIB)
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
|
|
@@ -180,7 +180,7 @@ set(STATIC_T "libgo_static")
|
|
add_library("${STATIC_T}" STATIC ${CO_SRC_LIST})
|
|
set_target_properties("${STATIC_T}" PROPERTIES OUTPUT_NAME "${TARGET}")
|
|
|
|
-if (UNIX)
|
|
+if (UNIX OR FORCE_UNIX_TARGETS)
|
|
add_subdirectory(${PROJECT_SOURCE_DIR}/libgo/main)
|
|
|
|
if (NOT DISABLE_DYNAMIC_LIB)
|
|
@@ -201,9 +201,15 @@ if (UNIX)
|
|
PATTERN "ctx_boost_coroutine" EXCLUDE
|
|
PATTERN "ctx_ucontext" EXCLUDE
|
|
PATTERN "*.h")
|
|
+ if(UNIX)
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/linux/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h")
|
|
+ else()
|
|
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/windows/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h")
|
|
+ endif()
|
|
+ if(NOT DISABLE_SYSTEMWIDE)
|
|
file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib")
|
|
install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d")
|
|
+ endif()
|
|
if (DEPEND_BOOST)
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ctx_boost_coroutine/ DESTINATION "include/libgo/ctx_boost_coroutine" FILES_MATCHING PATTERN "*.h")
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ctx_boost_context/ DESTINATION "include/libgo/ctx_boost_context" FILES_MATCHING PATTERN "*.h")
|