-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to help cmake find the right resources
- Loading branch information
1 parent
b3a82ca
commit 1dbf854
Showing
3 changed files
with
48 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
REG QUERY HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0 /v VCTargetsPath | ||
REG QUERY HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\4.0 /v VCTargetsPath | ||
cd wrappers\Python | ||
"%PYTHON%" setup.py install cmake=vc%VS_MAJOR%,%ARCH% | ||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% |
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,46 @@ | ||
diff --git a/wrappers/Python/setup.py b/wrappers/Python/setup.py | ||
--- a/wrappers/Python/setup.py | ||
+++ b/wrappers/Python/setup.py | ||
@@ -48,14 +48,6 @@ if __name__=='__main__': | ||
|
||
# Trying to change the standard library for C++ | ||
import platform | ||
- try: | ||
- macVersion = platform.mac_ver()[0].split('.') | ||
- if int(macVersion[0]) >= 10 and int(macVersion[1]) > 8: | ||
- os.environ["CC"] = "gcc" | ||
- os.environ["CXX"] = "g++" | ||
- print('switching compiler to g++ for OSX') | ||
- except: | ||
- pass | ||
|
||
# ****************************** | ||
# CMAKE OPTIONS | ||
@@ -110,7 +110,7 @@ if __name__=='__main__': | ||
if cmake_bitness == '32': | ||
cmake_config_args += ['-G','"Visual Studio 9 2008"'] | ||
elif cmake_bitness == '64': | ||
- cmake_config_args += ['-G','"Visual Studio 9 2008 Win64"'] | ||
+ cmake_config_args += ['-G','"NMake Makefiles"'] | ||
else: | ||
raise ValueError('cmake_bitness must be either 32 or 64; got ' + cmake_bitness) | ||
elif cmake_compiler == 'vc10': | ||
@@ -126,7 +126,7 @@ if __name__=='__main__': | ||
if cmake_bitness == '32': | ||
cmake_config_args += ['-G','"Visual Studio 14 2015"'] | ||
elif cmake_bitness == '64': | ||
- cmake_config_args += ['-G','"Visual Studio 14 2015 Win64"'] | ||
+ cmake_config_args += ['-G','"NMake Makefiles"'] | ||
else: | ||
raise ValueError('cmake_bitness must be either 32 or 64; got ' + cmake_bitness) | ||
elif cmake_compiler == 'mingw': | ||
@@ -171,7 +171,8 @@ if __name__=='__main__': | ||
static_libs = [] | ||
for search_suffix in ['Release/*.lib','Release/*.a', 'Debug/*.lib', 'Debug/*.a','*.a']: | ||
static_libs += glob.glob(os.path.join(cmake_build_dir,search_suffix)) | ||
- | ||
+ static_libs += glob.glob(os.path.join(cmake_build_dir, '*.lib')) | ||
+ print(cmake_build_dir, static_libs) | ||
if len(static_libs) != 1: | ||
raise ValueError("Found more than one static library using CMake build. Found: "+str(static_libs)) | ||
else: |