@@ -67,9 +67,6 @@ def create(final):
67
67
root_path = os .path .join (ports .get_dir (), port_name )
68
68
source_path = os .path .join (root_path , 'src' , 'cpp' )
69
69
source_include_paths = [os .path .join (root_path , 'external' ), os .path .join (root_path , 'include' )]
70
- target = os .path .join (port_name , 'GLFW' )
71
- for source_include_path in source_include_paths :
72
- ports .install_headers (os .path .join (source_include_path , 'GLFW' ), target = target )
73
70
74
71
flags = [f'-O{ opts ["optimizationLevel" ]} ' ]
75
72
@@ -101,11 +98,15 @@ def linker_setup(ports, settings):
101
98
settings .JS_LIBRARIES += [source_js_path ]
102
99
103
100
104
- # Using contrib.glfw3 to avoid installing headers into top level include path
105
- # so that we don't conflict with the builtin GLFW headers that emscripten
106
- # includes
101
+ # Makes GLFW includes accessible without installing them (ex: #include <GLFW/glfw3.h>)
107
102
def process_args (ports ):
108
- return ['-isystem' , ports .get_include_dir (port_name ), '-DEMSCRIPTEN_USE_PORT_CONTRIB_GLFW3' ]
103
+ root_path = os .path .join (ports .get_dir (), port_name )
104
+ args = [
105
+ '-I' , os .path .join (root_path , 'external' ), # <GLFW/glfw3.h>
106
+ '-I' , os .path .join (root_path , 'include' ), # <GLFW/emscripten_glfw3.h>
107
+ '-DEMSCRIPTEN_USE_PORT_CONTRIB_GLFW3'
108
+ ]
109
+ return args
109
110
110
111
111
112
def check_option (option , value , error_handler ):
0 commit comments