changed how building is triggered, now there is a [twn] shell script that is exptected to be in PATH. also physfs and libxm cmake targets no longer recompiled per every target, but shared
This commit is contained in:
		| @@ -51,8 +51,8 @@ set(PHYSFS_ARCHIVE_QPAK OFF) | ||||
| set(PHYSFS_ARCHIVE_SLB OFF) | ||||
| set(PHYSFS_ARCHIVE_ISO9660 OFF) | ||||
| set(PHYSFS_ARCHIVE_VDF OFF) | ||||
| add_subdirectory(third-party/physfs SYSTEM) | ||||
| add_subdirectory(third-party/libxm SYSTEM) | ||||
| add_subdirectory(third-party/physfs ${CMAKE_CURRENT_BINARY_DIR}/third-party/physfs SYSTEM) | ||||
| add_subdirectory(third-party/libxm ${CMAKE_CURRENT_BINARY_DIR}/third-party/libxm SYSTEM) | ||||
|  | ||||
|  | ||||
| if(LINUX) | ||||
|   | ||||
| @@ -6,10 +6,7 @@ if(NOT CMAKE_BUILD_TYPE) | ||||
|         set(CMAKE_BUILD_TYPE Debug) | ||||
| endif() | ||||
|  | ||||
| # add root townengine cmake file | ||||
| if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) | ||||
|         add_subdirectory(../../ ../../../.build) | ||||
| endif() | ||||
| add_subdirectory($ENV{TWNROOT} $ENV{TWNBUILDDIR}) | ||||
|  | ||||
| set(SOURCE_FILES | ||||
|         game.c | ||||
|   | ||||
| @@ -6,10 +6,7 @@ if(NOT CMAKE_BUILD_TYPE) | ||||
|         set(CMAKE_BUILD_TYPE Debug) | ||||
| endif() | ||||
|  | ||||
| # add root townengine cmake file | ||||
| if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) | ||||
|         add_subdirectory(../../ ../../../.build) | ||||
| endif() | ||||
| add_subdirectory($ENV{TWNROOT} $ENV{TWNBUILDDIR}) | ||||
|  | ||||
| set(SOURCE_FILES | ||||
|         game.c | ||||
|   | ||||
| @@ -1,7 +0,0 @@ | ||||
| #!/bin/env sh | ||||
|  | ||||
| if [ $1 = "web" ]; then | ||||
|     emcmake cmake -B .build-web "${@:2}" && cmake --build .build-web | ||||
| else | ||||
|     cmake -B .build "$@" && cmake --build .build | ||||
| fi | ||||
| @@ -6,10 +6,7 @@ if(NOT CMAKE_BUILD_TYPE) | ||||
|         set(CMAKE_BUILD_TYPE Debug) | ||||
| endif() | ||||
|  | ||||
| # add root townengine cmake file | ||||
| if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) | ||||
|         add_subdirectory(../../ ../../../.build) | ||||
| endif() | ||||
| add_subdirectory($ENV{TWNROOT} $ENV{TWNBUILDDIR}) | ||||
|  | ||||
| set(SOURCE_FILES | ||||
|         game.c | ||||
|   | ||||
| @@ -1,3 +0,0 @@ | ||||
| #!/bin/env sh | ||||
|  | ||||
| cmake -B .build "$@" && cmake --build .build | ||||
| @@ -1,6 +1,6 @@ | ||||
| #!/bin/env sh | ||||
| 
 | ||||
| if [ $1 = "web" ]; then | ||||
| if [ "$1" = "web" ]; then | ||||
|     emcmake cmake -B .build-web "${@:2}" && cmake --build .build-web | ||||
| else | ||||
|     cmake -B .build "$@" && cmake --build .build | ||||
							
								
								
									
										15
									
								
								tools/twn
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								tools/twn
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| #!/bin/env sh | ||||
| # townengine tooling interface | ||||
|  | ||||
| set +e | ||||
|  | ||||
| toolpath="$(dirname -- "${BASH_SOURCE[0]}")" | ||||
| export TWNROOT=$(realpath "$toolpath"/../) | ||||
| export TWNBUILDDIR=$(realpath "$toolpath"/../.build) | ||||
|  | ||||
| case "$1" in | ||||
|     build ) "$toolpath"/build.sh | ||||
|             ;; | ||||
|     *     ) echo "Unknown command." | ||||
|             ;; | ||||
| esac | ||||
		Reference in New Issue
	
	Block a user