Enable build through CMakeLists
This commit is contained in:
		
							parent
							
								
									07450e9fe8
								
							
						
					
					
						commit
						ac9dfe32c0
					
				@ -1,6 +1,7 @@
 | 
				
			|||||||
 | 
					# Configure cmake
 | 
				
			||||||
cmake_minimum_required(VERSION 3.1.0)
 | 
					cmake_minimum_required(VERSION 3.1.0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
project(ao)
 | 
					project(AttorneyOnline)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(CMAKE_CXX_STANDARD 20)
 | 
					set(CMAKE_CXX_STANDARD 20)
 | 
				
			||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
 | 
					set(CMAKE_CXX_STANDARD_REQUIRED ON)
 | 
				
			||||||
@ -13,4 +14,96 @@ if(CMAKE_VERSION VERSION_LESS "3.7.0")
 | 
				
			|||||||
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
 | 
					    set(CMAKE_INCLUDE_CURRENT_DIR ON)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# AO
 | 
				
			||||||
 | 
					add_executable(Attorney_Online
 | 
				
			||||||
 | 
					# resources
 | 
				
			||||||
 | 
					resources.qrc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# src
 | 
				
			||||||
 | 
					src/aoapplication.cpp
 | 
				
			||||||
 | 
					src/aoblipplayer.cpp
 | 
				
			||||||
 | 
					src/aobutton.cpp
 | 
				
			||||||
 | 
					src/aocaseannouncerdialog.cpp
 | 
				
			||||||
 | 
					src/aocharbutton.cpp
 | 
				
			||||||
 | 
					src/aocharmovie.cpp
 | 
				
			||||||
 | 
					src/aoemotebutton.cpp
 | 
				
			||||||
 | 
					src/aoevidencebutton.cpp
 | 
				
			||||||
 | 
					src/aoevidencedisplay.cpp
 | 
				
			||||||
 | 
					src/aoimage.cpp
 | 
				
			||||||
 | 
					src/aolineedit.cpp
 | 
				
			||||||
 | 
					src/aomovie.cpp
 | 
				
			||||||
 | 
					src/aomusicplayer.cpp
 | 
				
			||||||
 | 
					src/aooptionsdialog.cpp
 | 
				
			||||||
 | 
					src/aopacket.cpp
 | 
				
			||||||
 | 
					src/aoscene.cpp
 | 
				
			||||||
 | 
					src/aosfxplayer.cpp
 | 
				
			||||||
 | 
					src/aotextarea.cpp
 | 
				
			||||||
 | 
					src/aotextedit.cpp
 | 
				
			||||||
 | 
					src/charselect.cpp
 | 
				
			||||||
 | 
					src/chatlogpiece.cpp
 | 
				
			||||||
 | 
					src/courtroom.cpp
 | 
				
			||||||
 | 
					src/debug_functions.cpp
 | 
				
			||||||
 | 
					src/discord_rich_presence.cpp
 | 
				
			||||||
 | 
					src/emotes.cpp
 | 
				
			||||||
 | 
					src/evidence.cpp
 | 
				
			||||||
 | 
					src/file_functions.cpp
 | 
				
			||||||
 | 
					src/hardware_functions.cpp
 | 
				
			||||||
 | 
					src/lobby.cpp
 | 
				
			||||||
 | 
					src/main.cpp
 | 
				
			||||||
 | 
					src/misc_functions.cpp
 | 
				
			||||||
 | 
					src/networkmanager.cpp
 | 
				
			||||||
 | 
					src/packet_distribution.cpp
 | 
				
			||||||
 | 
					src/path_functions.cpp
 | 
				
			||||||
 | 
					src/scrolltext.cpp
 | 
				
			||||||
 | 
					src/text_file_functions.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# include
 | 
				
			||||||
 | 
					include/aoapplication.h
 | 
				
			||||||
 | 
					include/aoblipplayer.h
 | 
				
			||||||
 | 
					include/aobutton.h
 | 
				
			||||||
 | 
					include/aocaseannouncerdialog.h
 | 
				
			||||||
 | 
					include/aocharbutton.h
 | 
				
			||||||
 | 
					include/aocharmovie.h
 | 
				
			||||||
 | 
					include/aoemotebutton.h
 | 
				
			||||||
 | 
					include/aoevidencebutton.h
 | 
				
			||||||
 | 
					include/aoevidencedisplay.h
 | 
				
			||||||
 | 
					include/aoimage.h
 | 
				
			||||||
 | 
					include/aolineedit.h
 | 
				
			||||||
 | 
					include/aomovie.h
 | 
				
			||||||
 | 
					include/aomusicplayer.h
 | 
				
			||||||
 | 
					include/aooptionsdialog.h
 | 
				
			||||||
 | 
					include/aopacket.h
 | 
				
			||||||
 | 
					include/aoscene.h
 | 
				
			||||||
 | 
					include/aosfxplayer.h
 | 
				
			||||||
 | 
					include/aotextarea.h
 | 
				
			||||||
 | 
					include/aotextedit.h
 | 
				
			||||||
 | 
					include/bass.h
 | 
				
			||||||
 | 
					include/bassopus.h
 | 
				
			||||||
 | 
					include/chatlogpiece.h
 | 
				
			||||||
 | 
					include/courtroom.h
 | 
				
			||||||
 | 
					include/datatypes.h
 | 
				
			||||||
 | 
					include/debug_functions.h
 | 
				
			||||||
 | 
					include/discord-rpc.h
 | 
				
			||||||
 | 
					include/discord_register.h
 | 
				
			||||||
 | 
					include/discord_rich_presence.h
 | 
				
			||||||
 | 
					include/discord_rpc.h
 | 
				
			||||||
 | 
					include/file_functions.h
 | 
				
			||||||
 | 
					include/hardware_functions.h
 | 
				
			||||||
 | 
					include/lobby.h
 | 
				
			||||||
 | 
					include/misc_functions.h
 | 
				
			||||||
 | 
					include/networkmanager.h
 | 
				
			||||||
 | 
					include/scrolltext.h
 | 
				
			||||||
 | 
					include/text_file_functions.h
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Target Include
 | 
				
			||||||
 | 
					target_include_directories(Attorney_Online PRIVATE include)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Target Lib
 | 
				
			||||||
 | 
					find_package(Qt5 COMPONENTS Core Gui Network Widgets REQUIRED)
 | 
				
			||||||
 | 
					target_link_directories(Attorney_Online PRIVATE lib)
 | 
				
			||||||
 | 
					target_link_libraries(Attorney_Online PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt5::Widgets
 | 
				
			||||||
 | 
					    bass bassopus discord-rpc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Tests
 | 
				
			||||||
add_subdirectory(test)
 | 
					add_subdirectory(test)
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,6 @@ Running tests requires Catch2 and cmake
 | 
				
			|||||||
```sh
 | 
					```sh
 | 
				
			||||||
mkdir cbuild && cd cbuild
 | 
					mkdir cbuild && cd cbuild
 | 
				
			||||||
cmake ..
 | 
					cmake ..
 | 
				
			||||||
make
 | 
					make test
 | 
				
			||||||
./test/test
 | 
					./test/test
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user