[brlcad-commits] SF.net SVN: brlcad:[39951] brlcad/branches/cmake
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2010-07-28 20:00:01
|
Revision: 39951 http://brlcad.svn.sourceforge.net/brlcad/?rev=39951&view=rev Author: starseeker Date: 2010-07-28 19:59:53 +0000 (Wed, 28 Jul 2010) Log Message: ----------- Also not ideal in that it means altering the libpng CMake logic slightly, but this may be a cleaner approach than hardcoding at the toplevel. The get_directory_property offers some hope for a fully correct solution, but as yet I can't get it to work. Modified Paths: -------------- brlcad/branches/cmake/CMakeLists.txt brlcad/branches/cmake/src/other/libpng/CMakeLists.txt Modified: brlcad/branches/cmake/CMakeLists.txt =================================================================== --- brlcad/branches/cmake/CMakeLists.txt 2010-07-28 19:24:38 UTC (rev 39950) +++ brlcad/branches/cmake/CMakeLists.txt 2010-07-28 19:59:53 UTC (rev 39951) @@ -254,11 +254,7 @@ SET(BRLCAD_PNG_INCLUDE_DIR "${BRLCAD_SOURCE_DIR}/src/other/libpng" CACHE STRING "Directory containing libpng headers" FORCE) # BRL-CAD needs STDIO - turn it on SET(PNG_NO_STDIO OFF CACHE BOOL "Option to disable STDIO in PNG" FORCE) - # This is ugly, but there doesn't seem to be a good alternative yet - set PNG_LIB_NAME here so our projects can see it. - # Must match what would be produced by the png CMakeLists.txt file or badness will ensue. What would be nice is a way - # to mark this variable as "always overwrite in CACHE, no matter where it's changed" - anyone know of a good - # way to do that? This would let libpng have the last word without surgery on their CMakeLists.txt file. - SET(PNG_LIB_NAME "png14" CACHE STRING "Set the png library name at the BRL-CAD toplevel" FORCE) +# get_directory_property(BRLCAD_PNG_LIB_NAME DIRECTORY "${BRLCAD_SOURCE_DIR}/src/other/libpng" DEFINITION PNG_LIB_NAME) ELSE(NOT BRLCAD_USE_SYSTEM_PNG) SET(BRLCAD_PNG_INCLUDE_DIR "${PNG_INCLUDE_DIR}" CACHE STRING "Directory containing libpng headers" FORCE) ENDIF(NOT BRLCAD_USE_SYSTEM_PNG) Modified: brlcad/branches/cmake/src/other/libpng/CMakeLists.txt =================================================================== --- brlcad/branches/cmake/src/other/libpng/CMakeLists.txt 2010-07-28 19:24:38 UTC (rev 39950) +++ brlcad/branches/cmake/src/other/libpng/CMakeLists.txt 2010-07-28 19:59:53 UTC (rev 39951) @@ -179,6 +179,7 @@ # msvc does not append 'lib' - do it here to have consistent name set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib") endif() + SET(PNG_LIB_NAME_STATIC "${PNG_LIB_NAME_STATIC}" CACHE STRING "Put the final static library name in the cache" FORCE) endif() @@ -193,6 +194,9 @@ add_test(pngtest pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png) endif() +if(PNG_SHARED) + SET(PNG_LIB_NAME "${PNG_LIB_NAME}" CACHE STRING "Put the final library name in the cache" FORCE) +endif() # CREATE PKGCONFIG FILES # we use the same files like ./configure, so we have to set its vars This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |