Skip to content

Instantly share code, notes, and snippets.

@soulslicer
Created September 25, 2019 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soulslicer/bdf7004b34eb9e7b3692577e0239d525 to your computer and use it in GitHub Desktop.
Save soulslicer/bdf7004b34eb9e7b3692577e0239d525 to your computer and use it in GitHub Desktop.
CARLA Patch PNG
diff --git a/PythonAPI/carla/setup.py b/PythonAPI/carla/setup.py
index da5bbfb..fec897c 100755
--- a/PythonAPI/carla/setup.py
+++ b/PythonAPI/carla/setup.py
@@ -56,7 +56,7 @@ def get_libcarla_extensions():
extra_compile_args += ['-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false']
else:
extra_link_args += ['-lpng', '-ljpeg', '-ltiff']
- extra_compile_args += ['-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=true']
+ extra_compile_args += ['-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false']
# @todo Why would we need this?
include_dirs += ['/usr/lib/gcc/x86_64-linux-gnu/7/include']
library_dirs += ['/usr/lib/gcc/x86_64-linux-gnu/7']
@@ -91,7 +91,7 @@ def get_libcarla_extensions():
'/experimental:external', '/external:I', 'dependencies/include/system',
'/DBOOST_ALL_NO_LIB', '/DBOOST_PYTHON_STATIC_LIB',
'/DBOOST_ERROR_CODE_HEADER_ONLY', '/D_WIN32_WINNT=0x0501',
- '/DLIBCARLA_WITH_PYTHON_SUPPORT', '-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=true']
+ '/DLIBCARLA_WITH_PYTHON_SUPPORT', '-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false']
else:
raise NotImplementedError
diff --git a/Util/BuildTools/Setup.sh b/Util/BuildTools/Setup.sh
index 26238c8..53560dd 100755
--- a/Util/BuildTools/Setup.sh
+++ b/Util/BuildTools/Setup.sh
@@ -441,12 +441,13 @@ endif ()
EOL
-if [ "${TRAVIS}" == "true" ] ; then
- log "Travis CI build detected: disabling PNG support."
- echo "add_definitions(-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false)" >> ${CMAKE_CONFIG_FILE}.gen
-else
- echo "add_definitions(-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=true)" >> ${CMAKE_CONFIG_FILE}.gen
-fi
+# if [ "${TRAVIS}" == "true" ] ; then
+# log "Travis CI build detected: disabling PNG support."
+# echo "add_definitions(-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false)" >> ${CMAKE_CONFIG_FILE}.gen
+# else
+# echo "add_definitions(-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=true)" >> ${CMAKE_CONFIG_FILE}.gen
+# fi
+echo "add_definitions(-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false)" >> ${CMAKE_CONFIG_FILE}.gen
# -- Move files ----------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment