diff --git a/ANNOUNCE b/ANNOUNCE index 6cf657deb..c1b898e86 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -63,6 +63,8 @@ Version 1.5.5beta05 [August 17, 2011] pngpriv.h (functions yet to be implemented). Version 1.5.5beta06 [August 17, 2011] + Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set in CMakeLists.txt + (Clifford Yap) Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index f8005bea6..e2cfae8b2 100644 --- a/CHANGES +++ b/CHANGES @@ -3547,6 +3547,8 @@ Version 1.5.5beta05 [August 17, 2011] pngpriv.h (functions yet to be implemented). Version 1.5.5beta06 [August 17, 2011] + Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set in CMakeLists.txt + (Clifford Yap) Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CMakeLists.txt b/CMakeLists.txt index 5970385bf..09b9e950b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,15 @@ if(PNG_TESTS AND PNG_SHARED) add_test(pngtest ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png) endif() +# Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set +IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) + IF(WIN32) + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "bin") + ELSE(WIN32) + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib") + ENDIF(WIN32) +ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) + # # Set a variable with CMake code which: # Creates a symlink from src to dest (if possible) or alternatively