Changeset 91 in pacpusframework for trunk/cmake/Findlog4cxx.cmake


Ignore:
Timestamp:
05/19/13 12:32:48 (11 years ago)
Author:
DHERBOMEZ Gérald
Message:

Improvement of the build system to avoid some workarounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmake/Findlog4cxx.cmake

    r85 r91  
    1414include(FindPackageHandleStandardArgs)
    1515
    16 IF(IS_BUILDING_PACPUS)
    17         MESSAGE(AUTHOR_WARNING "Find log4cxx should use the folder inside pacpusframework to set include and library directories and not the environment variable LOG4CXX_ROOT")
    18 ENDIF(IS_BUILDING_PACPUS)
     16# For Windows, when building Pacpus use the local log4cxx files, else use the log4cxx files in the pacpus install dir
     17if(WIN32)
     18        if(IS_BUILDING_PACPUS)
     19                SET(LOG4CXX_ROOT "3rd/apache-log4cxx")
     20        elseif(PACPUS_ROOT)
     21                SET(LOG4CXX_ROOT "${PACPUS_ROOT}/3rd/apache-log4cxx")
     22        else()
     23                SET(LOG4CXX_ROOT "$ENV{PACPUS_ROOT}/3rd/apache-log4cxx")
     24        endif()
     25endif()
    1926
    20 # See if LOG4CXX_ROOT is not already set in CMake
    21 if(NOT LOG4CXX_ROOT)
    22     # See if LOG4CXX_ROOT is set in process environment
    23     if( NOT $ENV{LOG4CXX_ROOT} STREQUAL "" )
    24         SET(LOG4CXX_ROOT "$ENV{LOG4CXX_ROOT}")
    25         MESSAGE(STATUS "Detected LOG4CXX_ROOT set to '${LOG4CXX_ROOT}'")
    26     endif()
    27 endif()
     27
    2828
    2929set(LOG4CXX_INC_LIST
     
    9090
    9191# Output variables
    92 set(LOG4CXX_LIBRARIES "")
    9392if(LOG4CXX_FOUND)
    9493    # Include dirs
Note: See TracChangeset for help on using the changeset viewer.