Changeset 50 in pacpusframework for trunk/cmake/FindPacpus.cmake


Ignore:
Timestamp:
01/09/13 09:06:15 (11 years ago)
Author:
Marek Kurdej
Message:

CMake: updated to conform to the coding style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmake/FindPacpus.cmake

    r9 r50  
    1111
    1212# Check PACPUS_ROOT
    13 if (NOT PACPUS_ROOT)
    14   if (NOT ENV{PACPUS_ROOT} STREQUAL "")
    15     set(PACPUS_ROOT $ENV{PACPUS_ROOT})
    16     message(STATUS "Detected PACPUS_ROOT, set to '${PACPUS_ROOT}'")
    17   endif()
     13if(NOT PACPUS_ROOT)
     14    if(NOT ENV{PACPUS_ROOT} STREQUAL "")
     15        set(PACPUS_ROOT $ENV{PACPUS_ROOT})
     16        message(STATUS "Detected PACPUS_ROOT, set to '${PACPUS_ROOT}'")
     17    endif()
    1818endif()
    1919
     
    3030# Locate the include files
    3131find_path(
    32   PACPUS_INCLUDE_DIR
    33   NAMES
    34     "Pacpus"
    35   HINTS
    36     ${PACPUS_INCLUDE_HINT}
    37   DOC
    38     "The Pacpus include directory"
     32    PACPUS_INCLUDE_DIR
     33    NAMES
     34        "Pacpus"
     35    HINTS
     36        ${PACPUS_INCLUDE_HINT}
     37    DOC
     38        "The Pacpus include directory"
    3939)
    4040
    4141# List of required modules
    4242set(PACPUS_MODULES "FileLib" "PacpusLib" "PacpusTools" "dbiteplayerlib")
    43 if (WIN32)
    44   list(APPEND PACPUS_MODULES "ROAD_TIME")
     43if(WIN32)
     44    list(APPEND PACPUS_MODULES "ROAD_TIME")
    4545endif()
    4646
     
    5050# Check the presence of each module
    5151foreach(module ${PACPUS_MODULES})
    52   find_library(
    53     PACPUS_${module}_LIB
    54     NAMES
    55       ${module}
    56     HINTS
    57       ${PACPUS_LIBRARY_HINT}
    58   )
    59   find_library(
    60     PACPUS_${module}_LIBD
    61     NAMES
    62       ${module}_d
    63     HINTS
    64       ${PACPUS_LIBRARY_HINT}
    65   )
     52    find_library(
     53        PACPUS_${module}_LIB
     54        NAMES
     55            ${module}
     56        HINTS
     57            ${PACPUS_LIBRARY_HINT}
     58    )
     59    find_library(
     60        PACPUS_${module}_LIBD
     61        NAMES
     62            ${module}_d
     63        HINTS
     64            ${PACPUS_LIBRARY_HINT}
     65    )
    6666
    67   if (PACPUS_${module}_LIB AND PACPUS_${module}_LIBD)
    68     list(APPEND PACPUS_LIBRARIES optimized ${PACPUS_${module}_LIB})
    69     list(APPEND PACPUS_LIBRARIES debug ${PACPUS_${module}_LIBD})
    70   else()
    71     set(MODULE_MISSING TRUE)
    72   endif()
     67    if(PACPUS_${module}_LIB AND PACPUS_${module}_LIBD)
     68        list(APPEND PACPUS_LIBRARIES optimized ${PACPUS_${module}_LIB})
     69        list(APPEND PACPUS_LIBRARIES debug ${PACPUS_${module}_LIBD})
     70    else()
     71        set(MODULE_MISSING TRUE)
     72    endif()
    7373endforeach()
    7474
    7575if(NOT MODULE_MISSING AND PACPUS_INCLUDE_DIR)
    76   set(PACPUS_FOUND TRUE)
     76    set(PACPUS_FOUND TRUE)
    7777else()
    78   set(PACPUS_FOUND FALSE)
     78    set(PACPUS_FOUND FALSE)
    7979endif()
Note: See TracChangeset for help on using the changeset viewer.