diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-20 12:25:59 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-20 12:25:59 (GMT) |
commit | 24dfefcbc7f6c7e01146684ed02b21624d83d9e3 (patch) | |
tree | a18f8f08eee67de4055dfc994115da505c7f9396 /contrib/cmake | |
parent | 619d6c689561f1d73dd597ece8b5bfa61b565faa (diff) | |
download | uscxml-24dfefcbc7f6c7e01146684ed02b21624d83d9e3.zip uscxml-24dfefcbc7f6c7e01146684ed02b21624d83d9e3.tar.gz uscxml-24dfefcbc7f6c7e01146684ed02b21624d83d9e3.tar.bz2 |
Fixed issue77 with URL resolved from CWD on windows
Diffstat (limited to 'contrib/cmake')
-rw-r--r-- | contrib/cmake/BuildLibEvent.cmake | 4 | ||||
-rw-r--r-- | contrib/cmake/BuildXercesC.cmake | 82 |
2 files changed, 42 insertions, 44 deletions
diff --git a/contrib/cmake/BuildLibEvent.cmake b/contrib/cmake/BuildLibEvent.cmake index 486d4fb..f3bbc66 100644 --- a/contrib/cmake/BuildLibEvent.cmake +++ b/contrib/cmake/BuildLibEvent.cmake @@ -23,7 +23,9 @@ elseif (WIN32) BUILD_COMMAND nmake -f Makefile.nmake INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/libevent/lib && - ${CMAKE_COMMAND} -E copy libevent.lib libevent_core.lib libevent_extras.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ && + ${CMAKE_COMMAND} -E copy libevent.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ && + ${CMAKE_COMMAND} -E copy libevent_core.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ && + ${CMAKE_COMMAND} -E copy libevent_extras.lib ${CMAKE_BINARY_DIR}/deps/libevent/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/libevent/include && ${CMAKE_COMMAND} -E copy Win32-Code/event2/event-config.h ${CMAKE_BINARY_DIR}/deps/libevent/include/event2/ ) diff --git a/contrib/cmake/BuildXercesC.cmake b/contrib/cmake/BuildXercesC.cmake index 994a365..26cbdb1 100644 --- a/contrib/cmake/BuildXercesC.cmake +++ b/contrib/cmake/BuildXercesC.cmake @@ -2,19 +2,7 @@ # see http://tools.cinemapub.be/opendcp/opendcp-0.19-src/contrib/CMakeLists.txt include(ExternalProject) -if (UNIX) - externalproject_add(xerces-c - URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz - URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d - BUILD_IN_SOURCE 0 - PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c - CONFIGURE_COMMAND - "<SOURCE_DIR>/configure" - "--enable-static" - "--enable-shared" - "--prefix=<INSTALL_DIR>" - ) -elseif(WIN32) +if(MSVC) set(VC_VERSION VC12) # see https://en.wikipedia.org/wiki/Visual_C%2B%2B @@ -42,38 +30,46 @@ elseif(WIN32) set(VSPROJECT_PATH "projects/Win32/${VC_VERSION}/xerces-all/XercesLib") + set(XERCESC_BUILD_PATH_SUFFIX Win32) + set(XERCESC_BUILD_PLATFORM Win32) if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) - externalproject_add(xerces-c - URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz - URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d - BUILD_IN_SOURCE 1 - PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c - CONFIGURE_COMMAND "" - # BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Static\ Release /p:Platform=x64 /p:RuntimeLibrary=MD_DynamicRelease ${VC_PLATFORM} /t:build XercesLib.vcxproj - # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory Build/Win64/${VC_VERSION}/Static\ Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/ - BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Release /p:Platform=x64 ${VC_PLATFORM} /t:build XercesLib.vcxproj - INSTALL_COMMAND - ${CMAKE_COMMAND} -E copy_directory Build/Win64/${VC_VERSION}/Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && - ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ && - ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/ - ) - else() - externalproject_add(xerces-c - URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz - URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d - BUILD_IN_SOURCE 1 - PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c - CONFIGURE_COMMAND "" - # BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Static\ Release /p:Platform=Win32 /p:RuntimeLibrary=MD_DynamicRelease ${VC_PLATFORM} /t:build XercesLib.vcxproj - # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory Build/Win32/${VC_VERSION}/Static\ Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/ - BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Release /p:Platform=Win32 ${VC_PLATFORM} /t:build XercesLib.vcxproj - INSTALL_COMMAND - ${CMAKE_COMMAND} -E copy_directory Build/Win32/${VC_VERSION}/Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && - ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ && - ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/ - ) + set(XERCESC_BUILD_PATH_SUFFIX Win64) + set(XERCESC_BUILD_PLATFORM x64) endif() -endif() + + externalproject_add(xerces-c + URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz + URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d + BUILD_IN_SOURCE 1 + PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c + CONFIGURE_COMMAND "" + # BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Static\ Release /p:Platform=x64 /p:RuntimeLibrary=MD_DynamicRelease ${VC_PLATFORM} /t:build XercesLib.vcxproj + # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory Build/Win64/${VC_VERSION}/Static\ Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/ + BUILD_COMMAND cd ${VSPROJECT_PATH} && msbuild /p:Configuration=Release /p:Platform=${XERCESC_BUILD_PLATFORM} ${VC_PLATFORM} /t:build XercesLib.vcxproj + INSTALL_COMMAND + ${CMAKE_COMMAND} -E make_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Debug && + ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug && + ${CMAKE_COMMAND} -E make_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Release && + ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release && + ${CMAKE_COMMAND} -E copy_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Debug/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && + ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/ && + ${CMAKE_COMMAND} -E copy_directory Build/${XERCESC_BUILD_PATH_SUFFIX}/${VC_VERSION}/Release/ ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/ && + ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/deps/xerces-c/lib/xerces-c_3_1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/ && + ${CMAKE_COMMAND} -E copy_directory src/ ${CMAKE_BINARY_DIR}/deps/xerces-c/include/ + ) +else() + externalproject_add(xerces-c + URL http://ftp.halifax.rwth-aachen.de/apache/xerces/c/3/sources/xerces-c-3.1.3.tar.gz + URL_MD5 70320ab0e3269e47d978a6ca0c0e1e2d + BUILD_IN_SOURCE 0 + PREFIX ${CMAKE_BINARY_DIR}/deps/xerces-c + CONFIGURE_COMMAND + "<SOURCE_DIR>/configure" + "--enable-static" + "--enable-shared" + "--prefix=<INSTALL_DIR>" + ) +endif() # TODO: --with-curl=DIR |