~smspillaz/compiz-core/compiz-core.fix_939228

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Alan Griffiths
  • Author(s): Sam Spilsbury
  • Date: 2012-03-27 15:28:35 UTC
  • mfrom: (3063.2.1 compiz-core)
  • Revision ID: alan@octopull.co.uk-20120327152835-fgd5qahgo1ct6zjf
Fix LP#964248 - Build GTest locally

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
 
122
122
# Build Google Test and make its headers known
123
123
find_package (GTest)
 
124
 
 
125
if (NOT GTEST_FOUND)
 
126
 
 
127
    # Check for google test and build it locally
 
128
    set (GTEST_ROOT_DIR
 
129
        "/usr/src/gtest" # Default value, adjustable by user with e.g., ccmake
 
130
        CACHE
 
131
        PATH
 
132
        "Path to Google test srcs"
 
133
    )
 
134
 
 
135
    find_path (GTEST_INCLUDE_DIR gtest/gtest.h)
 
136
 
 
137
    if (GTEST_INCLUDE_DIR)
 
138
        #FIXME - hardcoded is bad!
 
139
        add_subdirectory (${GTEST_ROOT_DIR}
 
140
                      gtest)
 
141
    endif(GTEST_INCLUDE_DIR)
 
142
 
 
143
    set (GTEST_BOTH_LIBRARIES gtest gtest_main)
 
144
    set (GTEST_FOUND TRUE)
 
145
 
 
146
endif (NOT GTEST_FOUND)
 
147
 
124
148
find_library (GMOCK_LIBRARY gmock)
125
149
find_library (GMOCK_MAIN_LIBRARY gmock_main)
126
150