X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=CMakeLists.txt;h=0dc805a104f3b61d2af02446045db1faea960e81;hb=63c02f3d48d041b9c44c22b132221dd616e4b042;hp=5da2bccd49c84007928ef9a7fa256a124dcff3d7;hpb=c8f8ce861635eafe8c7a60a7bb245358d8b2d162;p=apitrace diff --git a/CMakeLists.txt b/CMakeLists.txt index 5da2bcc..0dc805a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,6 +178,12 @@ include_directories (${PNG_INCLUDE_DIR}) add_definitions (${PNG_DEFINITIONS}) link_libraries (${PNG_LIBRARIES}) +if (MSVC) + add_subdirectory (thirdparty/getopt EXCLUDE_FROM_ALL) + include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/getopt) + set (GETOPT_LIBRARIES getopt_bundled) +endif () + # The Qt website provides binaries for Windows and MacOSX, and they are # automatically found by cmake without any manual intervention. The situation # for QJSON is substantially different: there are no binaries for QJSON @@ -189,7 +195,7 @@ link_libraries (${PNG_LIBRARIES}) # AUTO. if (QT4_FOUND AND NOT QJSON_FOUND AND (ENABLE_GUI STREQUAL "AUTO")) add_subdirectory (thirdparty/qjson EXCLUDE_FROM_ALL) - set (QJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/qjson) + set (QJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty) set (QJSON_LIBRARY_DIRS) set (QJSON_LIBRARIES qjson_bundled) set (QJSON_FOUND TRUE) @@ -271,6 +277,7 @@ else () endif () add_library (common STATIC + common/trace_callset.cpp common/trace_dump.cpp common/trace_file.cpp common/trace_file_read.cpp @@ -573,6 +580,11 @@ if (WIN32 OR APPLE OR X11_FOUND) pthread dl ) + + if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries (glretrace rt) + endif () + endif () install (TARGETS glretrace RUNTIME DESTINATION bin) @@ -601,6 +613,10 @@ if (EGL_FOUND AND X11_FOUND AND NOT WIN32 AND NOT APPLE) dl ) + if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries (eglretrace rt) + endif () + install (TARGETS eglretrace RUNTIME DESTINATION bin) endif () @@ -614,7 +630,7 @@ add_subdirectory(cli) install ( PROGRAMS - ${CMAKE_CURRENT_SOURCE_DIR}/scripts/tracediff.sh + ${CMAKE_CURRENT_SOURCE_DIR}/scripts/tracediff.py ${CMAKE_CURRENT_SOURCE_DIR}/scripts/jsondiff.py ${CMAKE_CURRENT_SOURCE_DIR}/scripts/snapdiff.py DESTINATION ${SCRIPTS_INSTALL_DIR} @@ -641,7 +657,7 @@ install ( DESTINATION ${DOC_INSTALL_DIR} ) -set (CPACK_PACKAGE_VERSION_MAJOR "2") +set (CPACK_PACKAGE_VERSION_MAJOR "3") set (CPACK_PACKAGE_VERSION_MINOR "0") # Use current date in YYYYMMDD format as patch number @@ -650,6 +666,13 @@ execute_process ( OUTPUT_VARIABLE CPACK_PACKAGE_VERSION_PATCH ) +# cpack mistakenly detects Mingw-w64 as win32 +if (MINGW) + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set (CPACK_SYSTEM_NAME win64) + endif () +endif () + # See http://www.vtk.org/Wiki/CMake:CPackPackageGenerators if (WIN32) set (CPACK_GENERATOR "ZIP")