-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
13,438 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Copyright 2021 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
if(TARGET nonstd::span-lite) | ||
return() | ||
endif() | ||
|
||
message(STATUS "Third-party (external): creating target 'nonstd::span-lite'") | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
span-lite | ||
GIT_REPOSITORY https://github.com/martinmoene/span-lite.git | ||
GIT_TAG 1d79b2325f176979aea526fb76a3692e011049a5 | ||
) | ||
FetchContent_MakeAvailable(span-lite) | ||
|
||
set_target_properties(span-lite PROPERTIES FOLDER third_party) | ||
|
||
# On Windows, enable natvis files to improve debugging experience | ||
if(WIN32) | ||
target_sources(span-lite INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/span-lite.natvis>) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
|
||
<Type Name="nonstd::span_lite::span<*,*>"> | ||
<DisplayString Condition="size_ == 0">empty</DisplayString> | ||
<DisplayString Condition="size_ != 0">[{size_}] (span)</DisplayString> | ||
<Expand> | ||
<Item Name="[size]">size_</Item> | ||
<ArrayItems> | ||
<Size>size_</Size> | ||
<ValuePointer>data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
</AutoVisualizer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Find console script for code extraction | ||
find_program(CODE_EXTRACT_PATH NAMES code-extract) | ||
|
||
if(NOT CODE_EXTRACT_PATH) | ||
message(WARNING "Could not find code-extract script. Please make sure it is installed via conda/pip.") | ||
return() | ||
endif() | ||
|
||
message(STATUS "Code extract: ${CODE_EXTRACT_PATH}") | ||
|
||
# Custom target for code extraction | ||
set(extracted_code_dir "${CMAKE_CURRENT_BINARY_DIR}/extracted_code") | ||
file(MAKE_DIRECTORY "${extracted_code_dir}") | ||
|
||
add_custom_target(lagrange_extract_code_script | ||
COMMAND ${CODE_EXTRACT_PATH} | ||
${LAGRANGE_WEBSITE_REPO} | ||
${extracted_code_dir} | ||
) | ||
set_target_properties(lagrange_extract_code_script PROPERTIES FOLDER "${LAGRANGE_IDE_PREFIX}Lagrange/Utils") | ||
|
||
# Additionally execute this process at CMake time so we can capture the list of extracted files (very hacky approach) | ||
execute_process(COMMAND ${CODE_EXTRACT_PATH} ${LAGRANGE_WEBSITE_REPO} ${extracted_code_dir}) | ||
|
||
# New target to compile extracted code | ||
file(GLOB_RECURSE SRC_FILES "${extracted_code_dir}/*.cpp") | ||
source_group(TREE "${extracted_code_dir}/" PREFIX "Source Files" FILES ${SRC_FILES}) | ||
add_library(lagrange_extracted_code ${SRC_FILES}) | ||
|
||
# Dependencies. For now we only enable the core module. But once we cover more files on the website | ||
# we will have to include additional modules. | ||
lagrange_include_modules(core) | ||
# lagrange_include_modules(autouv core primitive raycasting ui) | ||
target_link_libraries(lagrange_extracted_code PRIVATE | ||
lagrange::core | ||
# lagrange::autouv | ||
# lagrange::primitive | ||
# lagrange::raycasting | ||
# lagrange::ui | ||
) | ||
add_dependencies(lagrange_extracted_code lagrange_extract_code_script) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.