mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 14:37:55 +08:00
[openexr] Fix linux build
This commit is contained in:
parent
8bb28d0de4
commit
f35ff4c8bc
14
ports/openexr/fix-static-linking.patch
Normal file
14
ports/openexr/fix-static-linking.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/IlmImf/CMakeLists.txt b/IlmImf/CMakeLists.txt
|
||||
index 18d90edc..21bbaa27 100644
|
||||
--- a/IlmImf/CMakeLists.txt
|
||||
+++ b/IlmImf/CMakeLists.txt
|
||||
@@ -25,8 +25,8 @@ ADD_EXECUTABLE ( dwaLookups
|
||||
|
||||
TARGET_LINK_LIBRARIES ( dwaLookups
|
||||
Half
|
||||
- Iex${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
+ Iex${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB}
|
||||
)
|
||||
|
@ -13,6 +13,7 @@ vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch"
|
||||
)
|
||||
|
||||
# Ensure helper executables can run during build
|
||||
@ -20,7 +21,7 @@ set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin")
|
||||
|
||||
# In debug build buildsystem cannot locate IlmBase headers
|
||||
set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}")
|
||||
set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenExr\"")
|
||||
set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenEXR\"")
|
||||
|
||||
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
|
@ -2,3 +2,17 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
|
||||
endif()
|
||||
set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||
set(CMAKE_CXX_FLAGS " ${VCPKG_CXX_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS " ${VCPKG_C_FLAGS}" CACHE STRING "")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user