Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion optix/optix_includes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

#if defined(_MSC_VER)
#define NOMINMAX
#endif

#include <optix.h>
#include <optix_stubs.h>
#include <optix_function_table_definition.h>
Expand All @@ -13,4 +17,4 @@ inline void optix_check_return(OptixResult result) {
ss << ": " << optixGetErrorString(result);
throw std::runtime_error(ss.str());
}
}
}
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from setuptools import setup, Extension, find_packages
from Cython.Build import cythonize
import re
import os
from pathlib import Path


Expand Down Expand Up @@ -49,8 +50,13 @@ def import_module_from_path(path):
'_OPTIX_VERSION_MICRO': optix_version_micro
}

libraries=[]
if os.name == 'nt':
# OptiX uses some Windows Registry API(e.g. RegCloseKey)
libraries.append('advapi32')

extensions = [Extension("*", ["optix/*.pyx"],
include_dirs=[cuda_include_path, optix_include_path])]
include_dirs=[cuda_include_path, optix_include_path], libraries=libraries)]
extensions = cythonize(extensions, language_level="3",
compile_time_env=cython_compile_env, build_dir="build")

Expand Down