init commit
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user