summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorSignal Linden <signal@lindenlab.com>2023-04-06 11:36:32 -0700
committerGitHub <noreply@github.com>2023-04-06 11:36:32 -0700
commit15a9a0e8db64c1435ebd45e88cf81c418f87a057 (patch)
tree6124b3d24b45abed536169c2c9b9032629bebc2a /indra/cmake
parentbb79718c8f0050569c80a1bfe4dd428321706d1a (diff)
parent6926368ff8fda01db062314801ce2b71d86ad02c (diff)
Merge pull request #144 from secondlife/signal/act
SL-18839: Add basic windows build
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake2
-rw-r--r--indra/cmake/Python.cmake8
2 files changed, 7 insertions, 3 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 9535e62e8f..58a64a8755 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -61,7 +61,7 @@ if (WINDOWS)
# CP changed to only append the flag for 32bit builds - on 64bit builds,
# locally at least, the build output is spammed with 1000s of 'D9002'
# warnings about this switch being ignored.
- if( ADDRESS_SIZE EQUAL 32 )
+ if(ADDRESS_SIZE EQUAL 32 AND DEFINED ENV{"TEAMCITY_PROJECT_NAME"})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
endif()
# zlib has assembly-language object files incompatible with SAFESEH
diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake
index dbf5033ce5..f9259f6c2b 100644
--- a/indra/cmake/Python.cmake
+++ b/indra/cmake/Python.cmake
@@ -2,7 +2,11 @@
set(PYTHONINTERP_FOUND)
-if (WINDOWS)
+if (DEFINED ENV{PYTHON})
+ # Allow python executable to be explicitly set
+ set(python "$ENV{PYTHON}")
+ set(PYTHONINTERP_FOUND ON)
+elseif (WINDOWS)
# On Windows, explicitly avoid Cygwin Python.
# if the user has their own version of Python installed, prefer that
@@ -43,7 +47,7 @@ else()
if (python)
set(PYTHONINTERP_FOUND ON)
endif (python)
-endif (WINDOWS)
+endif (DEFINED ENV{PYTHON})
if (NOT python)
message(FATAL_ERROR "No Python interpreter found")