Win build now copies the headers and libs of the new dependencies
This commit is contained in:
parent
1e5d87878e
commit
5ef2148e73
|
@ -7,14 +7,28 @@ file(GLOB libcarla_carla_rpclib "${RPCLIB_LIB_PATH}/*.*")
|
|||
install(FILES ${libcarla_carla_rpclib} DESTINATION lib)
|
||||
|
||||
# Install boost headers.
|
||||
|
||||
install(DIRECTORY "${BOOST_INCLUDE_PATH}/boost" DESTINATION include)
|
||||
|
||||
file(GLOB boost_libraries "${BOOST_LIB_PATH}/*")
|
||||
install(FILES ${boost_libraries} DESTINATION lib)
|
||||
|
||||
# Add sources.
|
||||
# Windows need libpng alongside with zlib to be installed
|
||||
if (WIN32)
|
||||
# Install zlib headers.
|
||||
file(GLOB zlib_includes "${ZLIB_INCLUDE_PATH}/*")
|
||||
install(FILES ${zlib_includes} DESTINATION include)
|
||||
# Install zlib lib.
|
||||
file(GLOB zlib_libraries "${ZLIB_LIB_PATH}/*")
|
||||
install(FILES ${zlib_libraries} DESTINATION lib)
|
||||
|
||||
# Install libpng headers.
|
||||
file(GLOB pnglib_includes "${LIBPNG_INCLUDE_PATH}/*")
|
||||
install(FILES ${pnglib_includes} DESTINATION include)
|
||||
# Install zlib lib.
|
||||
file(GLOB libpng_libraries "${LIBPNG_LIB_PATH}/*")
|
||||
install(FILES ${libpng_libraries} DESTINATION lib)
|
||||
endif (WIN32)
|
||||
|
||||
# Add sources.
|
||||
file(GLOB libcarla_carla_sources
|
||||
"${libcarla_source_path}/carla/*.cpp"
|
||||
"${libcarla_source_path}/carla/*.h")
|
||||
|
|
|
@ -84,10 +84,12 @@ if %errorlevel% neq 0 goto failed
|
|||
if not defined install_zlib (
|
||||
echo %FILE_N% Failed while installing zlib.
|
||||
goto failed
|
||||
) else (
|
||||
set ZLIB_INSTALL_DIR=%install_zlib:\=/%
|
||||
)
|
||||
|
||||
rem ============================================================================
|
||||
rem -- Download and install libpng -----------------------------------------------
|
||||
rem -- Download and install libpng ---------------------------------------------
|
||||
rem ============================================================================
|
||||
|
||||
echo %FILE_N% Installing libpng...
|
||||
|
@ -100,6 +102,8 @@ if %errorlevel% neq 0 goto failed
|
|||
if not defined install_libpng (
|
||||
echo %FILE_N% Failed while installing libpng.
|
||||
goto failed
|
||||
) else (
|
||||
set LIBPNG_INSTALL_DIR=%install_libpng:\=/%
|
||||
)
|
||||
|
||||
rem ============================================================================
|
||||
|
@ -171,24 +175,19 @@ rem ============================================================================
|
|||
for /f %%i in ('git describe --tags --dirty --always') do set carla_version=%%i
|
||||
set CMAKE_INSTALLATION_DIR=%INSTALLATION_DIR:\=/%
|
||||
|
||||
echo %FILE_N% Creating "CMakeLists.txt.in"...
|
||||
|
||||
>"%INSTALLATION_DIR%CMakeLists.txt.in" echo # Automatically generated by Setup.bat
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(CARLA_VERSION %carla_version%)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo.
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo if (WIN32)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo STRING (REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo STRING (REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo endif()
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo.
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo.
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo if (CMAKE_BUILD_TYPE STREQUAL "Server")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DASIO_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DBOOST_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DLIBCARLA_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DPUGIXML_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo endif ()
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo.
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(BOOST_INCLUDE_PATH "%CMAKE_INSTALLATION_DIR%boost-%BOOST_VERSION%-install/include")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(BOOST_LIB_PATH "%CMAKE_INSTALLATION_DIR%boost-%BOOST_VERSION%-install/lib")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo.
|
||||
|
@ -196,11 +195,20 @@ set CMAKE_INSTALLATION_DIR=%INSTALLATION_DIR:\=/%
|
|||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(RPCLIB_LIB_PATH "%CMAKE_INSTALLATION_DIR%rpclib-install/lib")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo.
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo if (CMAKE_BUILD_TYPE STREQUAL "Server")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo # Specific libraries for server
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(GTEST_INCLUDE_PATH "%CMAKE_INSTALLATION_DIR%gtest-install/include")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(GTEST_LIB_PATH "%CMAKE_INSTALLATION_DIR%gtest-install/lib")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo # Prevent exceptions
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DASIO_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DBOOST_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DLIBCARLA_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo add_definitions(-DPUGIXML_NO_EXCEPTIONS)
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo # Specific libraries for server
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(GTEST_INCLUDE_PATH "%CMAKE_INSTALLATION_DIR%gtest-install/include")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(GTEST_LIB_PATH "%CMAKE_INSTALLATION_DIR%gtest-install/lib")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo elseif (CMAKE_BUILD_TYPE STREQUAL "Client")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo # Specific libraries for client
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo # Specific libraries for client
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(ZLIB_INCLUDE_PATH "%ZLIB_INSTALL_DIR%/include")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(ZLIB_LIB_PATH "%ZLIB_INSTALL_DIR%/lib")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(LIBPNG_INCLUDE_PATH "%LIBPNG_INSTALL_DIR%/include")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo set(LIBPNG_LIB_PATH "%LIBPNG_INSTALL_DIR%/lib")
|
||||
>>"%INSTALLATION_DIR%CMakeLists.txt.in" echo endif ()
|
||||
|
||||
goto success
|
||||
|
|
|
@ -188,9 +188,8 @@ rem ============================================================================
|
|||
|
||||
:good_exit
|
||||
echo %FILE_N% Exiting...
|
||||
endlocal
|
||||
rem A return value used for checking for errors
|
||||
set install_libpng=done
|
||||
endlocal & set install_libpng=%LIBPNG_INSTALL_DIR%
|
||||
exit /b 0
|
||||
|
||||
:bad_exit
|
||||
|
|
|
@ -163,9 +163,8 @@ rem ============================================================================
|
|||
|
||||
:good_exit
|
||||
echo %FILE_N% Exiting...
|
||||
endlocal
|
||||
rem A return value used for checking for errors
|
||||
set install_zlib=done
|
||||
endlocal & set install_zlib=%ZLIB_INSTALL_DIR%
|
||||
exit /b 0
|
||||
|
||||
:bad_exit
|
||||
|
|
Loading…
Reference in New Issue