Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMAKE build system #1

Merged
merged 1 commit into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions VCMP-LUA.sln

This file was deleted.

72 changes: 72 additions & 0 deletions VCMP-LUA/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
cmake_minimum_required(VERSION 3.10)

project(lib-lua VERSION 1.0 LANGUAGES CXX)

option(BUILD_64 "" ON)

if(BUILD_64)
set(LUA_PLATFORM "x64")
else()
set(LUA_PLATFORM "x32")
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose Release or Debug" FORCE)
endif()

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()

add_library(lib-lua SHARED
${PROJECT_SOURCE_DIR}/Core.cpp
${PROJECT_SOURCE_DIR}/pch.cpp
# include
${PROJECT_SOURCE_DIR}/include/SimpleIni.h
${PROJECT_SOURCE_DIR}/include/utility.h
${PROJECT_SOURCE_DIR}/include/vcmp.h
# sol
${PROJECT_SOURCE_DIR}/sol/forward.hpp
${PROJECT_SOURCE_DIR}/sol/sol.hpp
# vcmpWrap
${PROJECT_SOURCE_DIR}/vcmpWrap/globalTables.h
${PROJECT_SOURCE_DIR}/vcmpWrap/vcmpCallbacks.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Player.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Player.cpp
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Vehicle.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Vehicle.cpp
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Server.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Server.cpp
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Stream.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/Stream.cpp
${PROJECT_SOURCE_DIR}/vcmpWrap/EventManager/EventManager.h
${PROJECT_SOURCE_DIR}/vcmpWrap/EventManager/EventManager.cpp
${PROJECT_SOURCE_DIR}/vcmpWrap/Timer/vcmpTimer.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Timer/vcmpTimer.cpp
${PROJECT_SOURCE_DIR}/vcmpWrap/Timer/TimerManager.h
${PROJECT_SOURCE_DIR}/vcmpWrap/Timer/TimerManager.cpp
# Lua
${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/include/lauxlib.h
${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/include/lua.h
${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/include/lua.hpp
${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/include/luaconf.h
${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/include/lualib.h
)

target_include_directories(lib-lua
PRIVATE
${PROJECT_SOURCE_DIR}/
${PROJECT_SOURCE_DIR}/include/
#${PROJECT_SOURCE_DIR}/sol/
${PROJECT_SOURCE_DIR}/vcmpWrap/
#${PROJECT_SOURCE_DIR}/vcmpWrap/Classes/
#${PROJECT_SOURCE_DIR}/vcmpWrap/EventManager/
#${PROJECT_SOURCE_DIR}/vcmpWrap/Timer/
)

target_include_directories(lib-lua PRIVATE ${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/include/)
target_link_libraries(lib-lua ${PROJECT_SOURCE_DIR}/lua/${LUA_PLATFORM}/lua53.lib)

set_target_properties(lib-lua PROPERTIES PREFIX "")
set_target_properties(lib-lua PROPERTIES OUTPUT_NAME "lua-plugin-${LUA_PLATFORM}")
2 changes: 1 addition & 1 deletion VCMP-LUA/Core.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "pch.h"
#include "include/utility.h"
#include "vcmpWrap/globaTables.h"
#include "vcmpWrap/globalTables.h"
#include "vcmpWrap/vcmpCallbacks.h"

PluginFuncs* g_Funcs;
Expand Down
54 changes: 0 additions & 54 deletions VCMP-LUA/VCMP-LUA.filters

This file was deleted.

6 changes: 0 additions & 6 deletions VCMP-LUA/VCMP-LUA.user

This file was deleted.

Loading