Skip to content

Commit

Permalink
Fix the windows build (AcademySoftwareFoundation#669)
Browse files Browse the repository at this point in the history
* Fix the windows build

* Don't need to specify --recursive when cloning
  • Loading branch information
meshula authored and ssteinbach committed Mar 26, 2020
1 parent 693ebeb commit 5f3c2c3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
7 changes: 6 additions & 1 deletion 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)

2 changes: 1 addition & 1 deletion docs/tutorials/quickstart.md
Expand Up @@ -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:

Expand Down
5 changes: 4 additions & 1 deletion 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")
Expand Down
5 changes: 4 additions & 1 deletion src/opentime/CMakeLists.txt
Expand Up @@ -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)
4 changes: 3 additions & 1 deletion src/opentimelineio/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit 5f3c2c3

Please sign in to comment.