From f6714b1484b641ea61053350b7d156d2da760b8b Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Sat, 21 May 2016 00:53:44 +0200 Subject: uriparser builds for MSVC again --- contrib/cmake/BuildURIParser.cmake | 56 +++++----- contrib/patches/uriparser/uriparser.vcxproj | 168 ++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 28 deletions(-) create mode 100644 contrib/patches/uriparser/uriparser.vcxproj diff --git a/contrib/cmake/BuildURIParser.cmake b/contrib/cmake/BuildURIParser.cmake index b6b228b..0c4d451 100644 --- a/contrib/cmake/BuildURIParser.cmake +++ b/contrib/cmake/BuildURIParser.cmake @@ -22,6 +22,34 @@ if (UNIX) "--enable-static" "--prefix=" ) +elseif(MSVC) + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + # we cannot build 64bit with the given project -> patch + externalproject_add(uriparser + URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip + URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa + BUILD_IN_SOURCE 1 + PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser + PATCH_COMMAND + ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/contrib/patches/uriparser/uriparser.vcxproj /win32/uriparser-vs2013 + CONFIGURE_COMMAND "" + BUILD_COMMAND cd win32/uriparser-vs2013 && devenv /Upgrade uriparser.vcxproj && msbuild /p:Configuration=Release /p:Platform=x64 /t:build uriparser.vcxproj + INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include + ) + else() + set(VSPROJECT_PATH "win32/Visual_Studio_2005") + + externalproject_add(uriparser + URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip + URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa + BUILD_IN_SOURCE 1 + PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser + CONFIGURE_COMMAND "" + BUILD_COMMAND cd ${VSPROJECT_PATH} && devenv /Upgrade uriparser.vcproj && msbuild /p:Configuration=Release /p:Platform=Win32 /t:build uriparser.vcxproj + INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include + ) + endif() + else() externalproject_add(uriparser URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip @@ -37,35 +65,7 @@ else() ) endif() - -# -# if(MSVC) -# -# if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) -# externalproject_add(uriparser -# URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip -# URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa -# BUILD_IN_SOURCE 1 -# PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser -# PATCH_COMMAND -# ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/contrib/patches/uriparser-vs2013 /win32/uriparser-vs2013 -# CONFIGURE_COMMAND "" -# BUILD_COMMAND cd win32/uriparser-vs2013 && devenv /Upgrade uriparser.vcxproj && msbuild /p:Configuration=Release /p:Platform=x64 /t:build uriparser.vcxproj -# INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include -# ) -# else() -# set(VSPROJECT_PATH "win32/Visual_Studio_2005") # -# externalproject_add(uriparser -# URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip -# URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa -# BUILD_IN_SOURCE 1 -# PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser -# CONFIGURE_COMMAND "" -# BUILD_COMMAND cd ${VSPROJECT_PATH} && devenv /Upgrade uriparser.vcproj && msbuild /p:Configuration=Release /p:Platform=Win32 /t:build uriparser.vcxproj -# INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include -# ) -# endif() # # elseif(MINGW) # # MinGW diff --git a/contrib/patches/uriparser/uriparser.vcxproj b/contrib/patches/uriparser/uriparser.vcxproj new file mode 100644 index 0000000..f115185 --- /dev/null +++ b/contrib/patches/uriparser/uriparser.vcxproj @@ -0,0 +1,168 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8E2F76A2-59B5-4DF7-8062-EBD6FCF0C8B3} + uriparser + Win32Proj + + + + StaticLibrary + v120 + Unicode + true + + + StaticLibrary + v120 + Unicode + true + + + StaticLibrary + v120 + Unicode + + + StaticLibrary + v120 + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>12.0.21005.1 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level4 + EditAndContinue + + + ..\uriparser.lib + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level4 + ProgramDatabase + + + ..\uriparser.lib + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + + + ..\uriparser.lib + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + ..\uriparser.lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v0.12