From 85cbfc6f409f9b12ebdeac8874e70e09e567b152 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 19 Jan 2013 06:15:39 +0000 Subject: [PATCH] Forum Issue: 1364 Simplication. --- CMakeLists.txt | 16 +++++++--------- cmake_doc.sh => doc/cmake_doc.sh | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) rename cmake_doc.sh => doc/cmake_doc.sh (95%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0bf1ab9..bea32612 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,14 +19,12 @@ endif(APPLE) # creates src/exv_conf.h which conflicts with cmake's own exv_conf.h # This causes incorrect compilation and linking errors. # -# Halt processing and ask the user to fix this. -# Remedy $ cd src; make clean -or- $ rm -rf src/exv_conf.h -if( EXISTS ${CMAKE_SOURCE_DIR}/src/exv_conf.h ) - message(FATAL_ERROR "${CMAKE_SOURCE_DIR}/src/exv_conf.h exists. Please remove file and re-run cmake!") +# It's OK to delete this as it will be recreated on demand by /Makefile +if( EXISTS "${CMAKE_SOURCE_DIR}/src/exv_conf.h" ) + file(REMOVE "${CMAKE_SOURCE_DIR}/src/exv_conf.h") endif() ## - SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required CMAKE_MINIMUM_REQUIRED( VERSION 2.6 ) PROJECT( exiv2 ) @@ -191,12 +189,12 @@ ADD_CUSTOM_TARGET(testv COMMAND make testv "EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin ## # http://dev.exiv2.org/boards/3/topics/1364 -# effectively does an make doc on the root directory -# has to run make config and ./configure -# and copy the taglist to be used to make docs +# effectively does a make doc on the root directory +# has to run 'make config' and './configure' +# and copy bin/taglist to /bin/taglist for use by 'make doc' IF( MINGW OR UNIX OR APPLE) ADD_CUSTOM_TARGET(doc - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/doc" COMMAND chmod +x ./cmake_doc.sh COMMAND ./cmake_doc.sh "${CMAKE_BINARY_DIR}" ) diff --git a/cmake_doc.sh b/doc/cmake_doc.sh similarity index 95% rename from cmake_doc.sh rename to doc/cmake_doc.sh index f6abab42..44dd6760 100755 --- a/cmake_doc.sh +++ b/doc/cmake_doc.sh @@ -5,8 +5,8 @@ ## if [ $# == 1 ]; then CMAKE_BINARY_DIR="$1" - echo hello world - + cd .. + if [ -e src/exv_conf.h ]; then mv src/exv_conf.h src/exv_conf.h.keep fi