libpng contains a main() function with a compiled test file. (Bug #2322)


Added by Adi Shavit over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-08-29
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:build/install
Target version:2.4.3
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hi,

It seems that the libpng CMake pulls in all *.c files, including pngtest.c which contains a main() function.
See this thread for the trouble it causes.
This file <OpenCV2.4.0>\3rdparty\libpng\CMakeLists.txt pulls in all *.c which includes the test program.
# ----------------------------------------------------------------------------
#  CMake file for libpng. See root CMakeLists.txt
#
# ----------------------------------------------------------------------------
project(${PNG_LIBRARY})

# List of C++ files:

ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})

file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.h)

Adi


Associated revisions

Revision 863e9c69
Added by Roman Donchenko about 11 years ago

Merge pull request #2322 from berak:b_cc_read

History

Updated by Adi Shavit over 12 years ago

I just saw that in c6d1421f9be64953353b39e5ab56f83f037fd41e to the Git repo, the file pngtest.c was removed, so the problem should go away.

Updated by Andrey Kamaev over 12 years ago

Yes, problem is fixed with 3rdparty libs update.

  • Assignee changed from Alexander Shishkov to Andrey Kamaev
  • Status changed from Open to Done
  • Target version set to 2.4.3

Also available in: Atom PDF