init commit
This commit is contained in:
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Directories
|
||||||
|
.vs/
|
||||||
|
.vscode/
|
||||||
|
bin/
|
||||||
|
bin-int/
|
||||||
|
.idea/
|
||||||
|
out/
|
||||||
|
|
||||||
|
|
||||||
|
# Clion
|
||||||
|
#cmake-build-debug/
|
||||||
|
#cmake-build-release/
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# directories
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Files
|
||||||
|
*.user
|
||||||
21
CMakeLists.txt
Normal file
21
CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.31)
|
||||||
|
project(Prism)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin-int)
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin-int)
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
|
# set MSVC output directory
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
add_subdirectory(Prism)
|
||||||
|
add_subdirectory(Sandbox)
|
||||||
|
add_subdirectory(Editor)
|
||||||
7
Editor/CMakeLists.txt
Normal file
7
Editor/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
project(PrismEditor)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE SRC_SOURCE ./**.cpp)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${SRC_SOURCE})
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE Prism-shared)
|
||||||
12
Editor/Editor/Editor.cpp
Normal file
12
Editor/Editor/Editor.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "Editor.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::cout << "Hello World!\n";
|
||||||
|
}
|
||||||
|
|
||||||
10
Editor/Editor/Editor.h
Normal file
10
Editor/Editor/Editor.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef EDITOR_H
|
||||||
|
#define EDITOR_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //EDITOR_H
|
||||||
43
Prism/CMakeLists.txt
Normal file
43
Prism/CMakeLists.txt
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
project(Prism)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE SRC_SOURCE src/**.cpp)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# static library
|
||||||
|
set(STATIC_LIBRARY ${PROJECT_NAME}-static)
|
||||||
|
|
||||||
|
add_library(${STATIC_LIBRARY} STATIC ${SRC_SOURCE})
|
||||||
|
|
||||||
|
target_compile_definitions(${STATIC_LIBRARY} PRIVATE PRISM_STATIC)
|
||||||
|
|
||||||
|
target_include_directories(${STATIC_LIBRARY} PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
)
|
||||||
|
set_target_properties(${STATIC_LIBRARY} PROPERTIES
|
||||||
|
OUTPUT_NAME ${PROJECT_NAME}
|
||||||
|
ARCHIVE_OUTPUT_NAME ${PROJECT_NAME}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# shared library
|
||||||
|
set(SHARED_LIBRARY ${PROJECT_NAME}-shared)
|
||||||
|
|
||||||
|
add_library(${SHARED_LIBRARY} SHARED ${SRC_SOURCE})
|
||||||
|
|
||||||
|
target_compile_definitions(${SHARED_LIBRARY} PRIVATE PRISM_SHARED BUILD_PRISM_DLL)
|
||||||
|
|
||||||
|
target_include_directories(${SHARED_LIBRARY} PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(${SHARED_LIBRARY} PROPERTIES
|
||||||
|
OUTPUT_NAME ${PROJECT_NAME}d
|
||||||
|
LIBRARY_OUTPUT_NAME ${PROJECT_NAME}d
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# alias
|
||||||
|
add_library(Prism::static ALIAS Prism-static)
|
||||||
|
add_library(Prism::shared ALIAS Prism-shared)
|
||||||
|
add_library(Prism ALIAS Prism-shared)
|
||||||
8
Prism/src/Prism.h
Normal file
8
Prism/src/Prism.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef PRISM_H
|
||||||
|
#define PRISM_H
|
||||||
|
|
||||||
|
#endif //PRISM_H
|
||||||
12
Prism/src/Prism/Application.cpp
Normal file
12
Prism/src/Prism/Application.cpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
|
namespace Prism
|
||||||
|
{
|
||||||
|
Application::Application()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Prism/src/Prism/Application.h
Normal file
20
Prism/src/Prism/Application.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef APPLICATION_H
|
||||||
|
#define APPLICATION_H
|
||||||
|
|
||||||
|
#include "Core/Core.h"
|
||||||
|
|
||||||
|
namespace Prism
|
||||||
|
{
|
||||||
|
class PRISM_API Application
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Application();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif //APPLICATION_H
|
||||||
19
Prism/src/Prism/Core/Core.h
Normal file
19
Prism/src/Prism/Core/Core.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef CORE_H
|
||||||
|
#define CORE_H
|
||||||
|
|
||||||
|
#if defined(PRISM_SHARED) && defined(_WIN32)
|
||||||
|
#ifdef BUILD_PRISM_DLL
|
||||||
|
#define PRISM_API __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define PRISM_API __declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define PRISM_API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif //CORE_H
|
||||||
8
Sandbox/CMakeLists.txt
Normal file
8
Sandbox/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
project(Sandbox)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE SRC_SOURCE ./**.cpp)
|
||||||
|
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${SRC_SOURCE})
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE Prism)
|
||||||
5
Sandbox/Sandbox/Sandbox.cpp
Normal file
5
Sandbox/Sandbox/Sandbox.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "Sandbox.h"
|
||||||
12
Sandbox/Sandbox/Sandbox.h
Normal file
12
Sandbox/Sandbox/Sandbox.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// Created by sfd on 25-11-15.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef SANDBOX_H
|
||||||
|
#define SANDBOX_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //SANDBOX_H
|
||||||
Reference in New Issue
Block a user