~ubuntu-branches/ubuntu/raring/apitrace/raring

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-02-13 16:32:44 UTC
  • Revision ID: package-import@ubuntu.com-20120213163244-fs0i1sh6e8x506v6
Tags: 3.0+git20121018.d1c301f7-0ubuntu1
Initial release (Closes: #636679, LP: #813848)

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
# - on unices to prevent symbol collisions when tracing applications that link
160
160
# against other versions of these libraries
161
161
 
162
 
set (ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib)
163
 
set (ZLIB_LIBRARIES z_bundled)
164
 
add_subdirectory (thirdparty/zlib EXCLUDE_FROM_ALL)
165
 
 
 
162
find_package (ZLIB REQUIRED)
166
163
include_directories (${ZLIB_INCLUDE_DIRS})
167
164
 
168
 
set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
169
 
set (SNAPPY_LIBRARIES snappy_bundled)
 
165
#
 
166
# libSnappy doesn't ship a pc file, because it is made of hate
 
167
#
 
168
#find_package (SNAPPY REQUIRED)
 
169
set (SNAPPY_INCLUDE_DIRS "")
 
170
set (SNAPPY_LIBRARIES -lsnappy)
 
171
 
 
172
include_directories (${SNAPPY_INCLUDE_DIRS})
 
173
 
 
174
set (BUNDLED_SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
 
175
set (BUNDLED_SNAPPY_LIBRARIES snappy_bundled)
170
176
add_subdirectory (thirdparty/snappy EXCLUDE_FROM_ALL)
171
177
 
172
 
include_directories (${SNAPPY_INCLUDE_DIRS})
173
 
 
174
 
set (PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng)
175
 
set (PNG_DEFINITIONS "")
176
 
set (PNG_LIBRARIES png_bundled)
177
 
 
178
 
add_subdirectory (thirdparty/libpng EXCLUDE_FROM_ALL)
 
178
 
 
179
find_package (PNG REQUIRED)
179
180
include_directories (${PNG_INCLUDE_DIR})
180
181
add_definitions (${PNG_DEFINITIONS})
181
182
 
243
244
 
244
245
set (SCRIPTS_INSTALL_DIR ${LIB_INSTALL_DIR}/scripts)
245
246
set (WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers)
 
247
set (CONFIG_INSTALL_DIR /etc/apitrace.d)
246
248
 
247
249
# Expose the binary/install directories to source
248
250
#
254
256
    -DAPITRACE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
255
257
    -DAPITRACE_SCRIPTS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTS_INSTALL_DIR}"
256
258
    -DAPITRACE_WRAPPERS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}"
257
 
)
 
259
    -DAPITRACE_CONFIG_INSTALL_DIR="${CONFIG_INSTALL_DIR}")
 
260
 
258
261
 
259
262
 
260
263
##############################################################################
360
363
    DESTINATION ${DOC_INSTALL_DIR}
361
364
)
362
365
 
 
366
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 
367
    # Generate wrapper config file
 
368
    add_custom_command(OUTPUT ${ARCH_SUBDIR}.conf
 
369
        COMMAND sh -c "echo ${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR} >${ARCH_SUBDIR}.conf")
 
370
 
 
371
    add_custom_target(wrapper_config 
 
372
        ALL 
 
373
        DEPENDS 
 
374
            ${CMAKE_BINARY_DIR}/${ARCH_SUBDIR}.conf
 
375
    )
 
376
 
 
377
    install (FILES
 
378
            ${CMAKE_BINARY_DIR}/${ARCH_SUBDIR}.conf
 
379
        DESTINATION
 
380
            ${CONFIG_INSTALL_DIR}
 
381
    )
 
382
endif()
 
383
 
363
384
set (CPACK_PACKAGE_VERSION_MAJOR "3")
364
385
set (CPACK_PACKAGE_VERSION_MINOR "0")
365
386