mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index dbbdd7d..29396a5 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -137,7 +137,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}")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS}")
|
|
-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")
|
|
@@ -159,7 +159,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)
|
|
@@ -180,7 +180,11 @@ 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()
|
|
#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")
|
|
if (DEPEND_BOOST)
|