Skip to content

Commit d22f9d1

Browse files
committed
Fix windows compilation (REAL=double) and installation (proper replace include paths)
1 parent 195af21 commit d22f9d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: src/SConscript

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if env['PLATFORM'] == 'darwin':
2929
# Compiler specific options
3030
if platform.system().lower() == "windows":
3131
# Visual c++
32-
env.PrependUnique(CCFLAGS=['/Ox', '/EHsc', '/MD'])
32+
env.PrependUnique(CCFLAGS=['/Ox', '/EHsc', '/MD', '/DREAL=double'])
3333
env.AppendUnique(CPPDEFINES={'NDEBUG': None})
3434
# env.AppendUnique(LINKFLAGS='/EXPORT')
3535
else:
@@ -113,8 +113,10 @@ Alias('install-lib', install_lib)
113113
# install-include - make sure the root include directory is "ObjCryst", so tweak the path a little,
114114
# so it still works using the objcryst submodule
115115
ninc = len(Dir('.').path) + 1
116+
s = os.path.sep
116117
inc_target_path = lambda f: os.path.join(env['includedir'],
117-
f.path[ninc:].replace('objcryst/', '').replace('version/', 'ObjCryst/'))
118+
f.path[ninc:].replace(
119+
'objcryst' + s, '').replace('version' + s, 'ObjCryst' + s))
118120
include_targets = [inc_target_path(f) for f in env['lib_includes']]
119121
install_include = InstallAs(include_targets, env['lib_includes'])
120122
Alias('install-include', install_include)

0 commit comments

Comments
 (0)