From 5f3c2c3292b934598504a4afea5abdead6793dbb Mon Sep 17 00:00:00 2001 From: Nick Porcino Date: Tue, 24 Mar 2020 12:01:45 -0700 Subject: [PATCH] Fix the windows build (#669) * Fix the windows build * Don't need to specify --recursive when cloning --- CMakeLists.txt | 7 ++++++- docs/tutorials/quickstart.md | 2 +- src/CMakeLists.txt | 5 ++++- src/opentime/CMakeLists.txt | 5 ++++- src/opentimelineio/CMakeLists.txt | 4 +++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 828c56b7b..7e87d8189 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,10 @@ -cmake_minimum_required(VERSION 2.8.12) +if (WINDOWS) +cmake_minimum_required(VERSION 3.17.0) +else() +cmake_minimum_required(VERSION 3.9.4) +endif() project(OPENTIMELINEIO_ROOT) add_subdirectory(src) + diff --git a/docs/tutorials/quickstart.md b/docs/tutorials/quickstart.md index 64759d195..c5e56fac3 100644 --- a/docs/tutorials/quickstart.md +++ b/docs/tutorials/quickstart.md @@ -30,7 +30,7 @@ Once you have pip installed OpenTimelineIO, you should be able to run: # Developer Quickstart 0. Get the source and submodules: - + `git clone --recursive git@github.com:PixarAnimationStudios/OpenTimelineIO.git` + + `git clone git@github.com:PixarAnimationStudios/OpenTimelineIO.git` 1. To build OTIO for C++ development: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e39623584..33254653c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,9 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.9.4) set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + if(MSVC) set(PYBIND11_CPP_STANDARD /std:c++14) set(CMAKE_CXX_FLAGS "/W4 /EHsc") diff --git a/src/opentime/CMakeLists.txt b/src/opentime/CMakeLists.txt index 749b7f81f..d87619ca5 100644 --- a/src/opentime/CMakeLists.txt +++ b/src/opentime/CMakeLists.txt @@ -14,7 +14,10 @@ add_library(opentime SHARED target_include_directories(opentime PUBLIC "${PROJECT_SOURCE_DIR}/src") set_target_properties(opentime PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" MACOSX_RPATH true WINDOWS_EXPORT_ALL_SYMBOLS true) -install(TARGETS opentime LIBRARY DESTINATION lib) +install(TARGETS opentime + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) + if (NOT OTIO_CXX_NOINSTALL) install(FILES ${OPENTIME_HEADER_FILES} DESTINATION include/opentime) endif (NOT OTIO_CXX_NOINSTALL) diff --git a/src/opentimelineio/CMakeLists.txt b/src/opentimelineio/CMakeLists.txt index 5e49c96e2..c55aca05d 100644 --- a/src/opentimelineio/CMakeLists.txt +++ b/src/opentimelineio/CMakeLists.txt @@ -77,7 +77,9 @@ target_include_directories(opentimelineio PUBLIC target_link_libraries(opentimelineio PUBLIC opentime) set_target_properties(opentimelineio PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" MACOSX_RPATH true WINDOWS_EXPORT_ALL_SYMBOLS true) -install(TARGETS opentimelineio LIBRARY DESTINATION lib) +install(TARGETS opentimelineio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib) if (NOT OTIO_CXX_NOINSTALL) install(FILES ${OPENTIMELINEIO_HEADER_FILES} DESTINATION include/opentimelineio)