1
- # Copyright (c) 2017, uniflare, see LICENSE.txt for details
2
- # Make sure you set these variables appropriately! (If using a host project)
3
- #
4
- set (USE_TEST_PLATFORM_PROJECT "FALSE" )
1
+ cmake_minimum_required (VERSION 3.6.2)
2
+ set (CRYENGINE_DIR "C:/Program Files (x86)/Crytek/CRYENGINE Launcher/Crytek/CRYENGINE_5.4" )
3
+ set (TOOLS_CMAKE_DIR "${CRYENGINE_DIR} /Tools/CMake" )
4
+
5
+ set (PROJECT_BUILD 1)
6
+ set (PROJECT_DIR "C:/dev/git/sf/SplashExample" )
7
+
8
+ include ("${TOOLS_CMAKE_DIR} /CommonOptions.cmake" )
9
+
10
+ add_subdirectory ("${CRYENGINE_DIR} " "${CMAKE_CURRENT_BINARY_DIR} /CRYENGINE" )
11
+
12
+ include ("${TOOLS_CMAKE_DIR} /Configure.cmake" )
13
+ start_sources()
14
+
15
+ sources_platform(ALL )
16
+ add_sources("Code_uber.cpp"
17
+ PROJECTS SplashExamplePlugin
18
+ SOURCE_GROUP "Root"
19
+ "Plugin.cpp"
20
+ "SplashExample.cpp"
21
+ "StdAfx.cpp"
22
+ "cvars.h"
23
+ "Plugin.h"
24
+ "SplashExample.h"
25
+ "StdAfx.h"
26
+ )
5
27
6
- set (TestPlatformRoot "C:/dev/git/sf/BLANKGAME" )
7
- set (TestPlatformPath "${TestPlatformRoot} /bin/win_x64" )
8
- set (TestPlatformProject "${TestPlatformRoot} /Game.cryproject" )
28
+ end_sources()
9
29
10
- # Default to this project, if no test platform project is used
11
- if (NOT USE_TEST_PLATFORM_PROJECT)
12
- set (TestPlatformProject "${PROJECT_FILE} " )
13
- endif ()
30
+ CryEngineModule(SplashExamplePlugin PCH "StdAfx.cpp" SOLUTION_FOLDER "Project" )
14
31
15
- set (ProjectName "SplashExample" )
32
+ target_include_directories (${THIS_PROJECT}
33
+ PRIVATE
34
+ "${CRYENGINE_DIR} /Code/CryEngine/CryCommon"
35
+ "${CRYENGINE_DIR} /Code/CryEngine/CryAction"
36
+ "${CRYENGINE_DIR} /Code/CryEngine/CrySchematyc/Core/Interface"
37
+ "${CRYENGINE_DIR} /Code/CryPlugins/CryDefaultEntities/Module"
38
+ )
16
39
17
- cmake_minimum_required (VERSION 3.6.0)
18
- project (${ProjectName} VERSION 1.3.0 LANGUAGES CXX)
40
+ # Set StartUp project in Visual Studio
19
41
20
- if ( ${CMAKE_GENERATOR} MATCHES "^Visual Studio " )
21
- # Set startup project properties
22
- configure_file ( " ${PROJECT_NAME} .vcxproj.user.in" " ${CMAKE_CURRENT_BINARY_DIR} / ${PROJECT_NAME} .vcxproj.user" )
23
- set_property ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME} )
42
+ add_library (GameLauncher STATIC " ${CRYENGINE_DIR} /Code/CryEngine/CryCommon/CryCore/Platform/platform.h " )
43
+ set_target_properties (GameLauncher PROPERTIES LINKER_LANGUAGE CXX)
44
+ if ( WIN32 )
45
+ set_visual_studio_debugger_command(GameLauncher " ${CRYENGINE_DIR} /bin/win_x64/GameLauncher.exe" "-project \" C:/dev/git/sf/SplashExample/SplashExamplePlugin.cryproject \" " )
24
46
endif ()
25
47
26
- # Set output directory for executable files
27
- if (CMAKE_CL_64 )
28
- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x64" )
29
- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x64_release" )
30
- else (CMAKE_CL_64 )
31
- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x86" )
32
- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x86_release" )
33
- endif (CMAKE_CL_64 )
34
-
35
- # Set output directory for DLL files
36
- if (CMAKE_CL_64 )
37
- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x64" )
38
- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x64_release" )
39
- else (CMAKE_CL_64 )
40
- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x86" )
41
- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x86_release" )
42
- endif (CMAKE_CL_64 )
43
-
44
- # Set output directory for LIB files
45
- if (CMAKE_CL_64 )
46
- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x64\\ lib" )
47
- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x64_release\\ lib" )
48
- else (CMAKE_CL_64 )
49
- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x86\\ lib" )
50
- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR} \\ ..\\ ..\\ bin\\ win_x86_release\\ lib" )
51
- endif (CMAKE_CL_64 )
52
-
53
- option (OPTION_PCH "Enable Precompiled headers" ON )
54
-
55
- find_package (CryCommon REQUIRED)
56
- find_package (CryAction REQUIRED)
57
-
58
- set (SourceGroup_Main
59
- "SplashExample.cpp"
60
- "SplashExample.h"
61
- "Plugin.cpp"
62
- "Plugin.h"
63
- "CVars.h"
64
- "StdAfx.cpp"
65
- "StdAfx.h"
66
- )
67
- source_group ("Main" FILES ${SourceGroup_Main} )
48
+ add_library (Sandbox STATIC "${CRYENGINE_DIR} /Code/CryEngine/CryCommon/CryCore/Platform/platform.h" )
49
+ set_target_properties (Sandbox PROPERTIES LINKER_LANGUAGE CXX)
50
+ if (WIN32 )
51
+ set_visual_studio_debugger_command(Sandbox "${CRYENGINE_DIR} /bin/win_x64/Sandbox.exe" "-project \" C:/dev/git/sf/SplashExample/SplashExamplePlugin.cryproject\" " )
52
+ endif ()
68
53
69
- set (SOURCE
70
- ${SourceGroup_Main}
71
- )
72
- if (OPTION_PCH AND MSVC )
73
- set (PRECOMPILED_SOURCE ${SOURCE} )
74
- list (REMOVE_ITEM PRECOMPILED_SOURCE "StdAfx.cpp" )
54
+ add_library (GameServer STATIC "${CRYENGINE_DIR} /Code/CryEngine/CryCommon/CryCore/Platform/platform.h" )
55
+ set_target_properties (GameServer PROPERTIES LINKER_LANGUAGE CXX)
56
+ if (WIN32 )
57
+ set_visual_studio_debugger_command(GameServer "${CRYENGINE_DIR} /bin/win_x64/Game_Server.exe" "-project \" C:/dev/git/sf/SplashExample/SplashExamplePlugin.cryproject\" " )
58
+ endif ()
75
59
76
- set (PRECOMPILED_BINARY ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} .pch)
77
- set_source_files_properties (${PRECOMPILED_SOURCE} PROPERTIES COMPILE_FLAGS "/Yu\" StdAfx.h\" /Fp\" ${PRECOMPILED_BINARY} \" " OBJECT_DEPENDS "${PRECOMPILED_BINARY} " )
78
- set_source_files_properties (StdAfx.cpp PROPERTIES COMPILE_FLAGS "/Yc\" StdAfx.h\" /Fp\" ${PRECOMPILED_BINARY} \" " OBJECT_OUTPUTS "${PRECOMPILED_BINARY} " )
79
- endif (OPTION_PCH AND MSVC )
60
+ set_solution_startup_target(GameLauncher)
80
61
81
- add_library (${PROJECT_NAME} MODULE ${SOURCE} )
82
- target_include_directories (${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
83
- target_link_libraries (${PROJECT_NAME} PRIVATE CryCommon CryAction)
62
+ if (WIN32 )
63
+ set_visual_studio_debugger_command( ${THIS_PROJECT} "${CRYENGINE_DIR} /bin/win_x64/GameLauncher.exe" "-project \" C:/dev/git/sf/SplashExample/SplashExamplePlugin.cryproject\" " )
64
+ endif ()
65
+
66
+ #BEGIN-CUSTOM
67
+ set (USE_TEST_PLATFORM_PROJECT "FALSE" )
84
68
85
- # Add _RELEASE define to release config
86
- target_compile_definitions ( ${PROJECT_NAME}
87
- PUBLIC $<$<CONFIG:Release>:_RELEASE> )
69
+ set (TestPlatformRoot "C:/dev/git/sf/BLANKGAME/" )
70
+ set (TestPlatformPath " ${TestPlatformRoot} bin/win_x64/" )
71
+ set (TestPlatformProject " ${TestPlatformRoot} Game.cryproject" )
88
72
89
- if (WIN32 )
90
- target_link_libraries (${PROJECT_NAME} PRIVATE Ntdll)
91
- endif (WIN32 )
73
+ # Default to this project, if no test platform project is used
74
+ if (NOT USE_TEST_PLATFORM_PROJECT)
75
+ set (TestPlatformProject "${PROJECT_FILE} " )
76
+ endif ()
92
77
93
78
if (USE_TEST_PLATFORM_PROJECT)
94
- add_custom_command (TARGET ${PROJECT_NAME } POST_BUILD
79
+ add_custom_command (TARGET ${THIS_PROJECT } POST_BUILD
95
80
COMMAND "${CMAKE_COMMAND} " -E copy
96
- "$<TARGET_FILE:${PROJECT_NAME } >"
97
- "${TestPlatformPath} /$<TARGET_FILE_NAME:${PROJECT_NAME } >"
81
+ "$<TARGET_FILE:${THIS_PROJECT } >"
82
+ "${TestPlatformPath} /$<TARGET_FILE_NAME:${THIS_PROJECT } >"
98
83
COMMENT "Copying to test platform directory" )
99
- endif (USE_TEST_PLATFORM_PROJECT)
84
+ endif (USE_TEST_PLATFORM_PROJECT)
85
+ #END-CUSTOM
0 commit comments