vcpkg/ports/libgo/cmake.patch

35 lines
1.5 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
2018-05-24 07:00:29 +08:00
index dbbdd7d..29396a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2018-05-24 07:00:29 +08:00
@@ -137,7 +137,7 @@ if (UNIX)
set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}")
2018-05-24 07:00:29 +08:00
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")
2018-05-24 07:00:29 +08:00
@@ -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)
2018-05-24 07:00:29 +08:00
@@ -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()
2018-05-24 07:00:29 +08:00
#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)