X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=CMakeLists.txt;h=0dc805a104f3b61d2af02446045db1faea960e81;hb=63c02f3d48d041b9c44c22b132221dd616e4b042;hp=538ca8e80f08fc8ab837c9d29cd569c8a3f9f7b4;hpb=4c5f6fa4d7474bc2a13a6c00bd3f4ac47ff56920;p=apitrace diff --git a/CMakeLists.txt b/CMakeLists.txt index 538ca8e..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 @@ -278,7 +284,6 @@ add_library (common STATIC common/trace_file_write.cpp common/trace_file_zlib.cpp common/trace_file_snappy.cpp - common/trace_copier.cpp common/trace_model.cpp common/trace_parser.cpp common/trace_parser_flags.cpp @@ -625,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} @@ -652,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 @@ -661,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")