Compare commits
No commits in common. "96c82dbf2243aa7ab83d1f502c3b73d27a121665" and "5fdc7452594610da1e70061d747eb138828b9e9d" have entirely different histories.
96c82dbf22
...
5fdc745259
7 changed files with 6 additions and 57 deletions
1
BUILD.md
1
BUILD.md
|
@ -22,7 +22,6 @@ The project will be built using VCPKG and MSVC
|
||||||
* Qt 6.8.3 or higher, with MSVC toolchain
|
* Qt 6.8.3 or higher, with MSVC toolchain
|
||||||
* CMake
|
* CMake
|
||||||
* Git (for cloning the repo, optional)
|
* Git (for cloning the repo, optional)
|
||||||
* QScintilla already built (see [docs/qscintilla.md](./docs/qscintilla.md)) *\*likely temporary\**
|
|
||||||
|
|
||||||
To start, clone the repository:
|
To start, clone the repository:
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
# Modified from QGIS' FindQScintilla.cmake by Thomas Moenicke, Larry Schaffer
|
# Modified from QGIS' FindQScintilla.cmake by Thomas Moenicke, Larry Schaffer
|
||||||
|
|
||||||
add_library(QScintilla::QScintilla UNKNOWN IMPORTED)
|
|
||||||
|
|
||||||
### NECESSARY TO PREVENT staticMetaObject ERROR!!! See qscintilla.prf AKA qmake config
|
|
||||||
if(WIN32)
|
|
||||||
add_compile_definitions(QSCINTILLA_DLL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
FIND_PATH(QSCINTILLA_INCLUDE_DIR
|
FIND_PATH(QSCINTILLA_INCLUDE_DIR
|
||||||
NAMES Qsci/qsciglobal.h
|
NAMES Qsci/qsciglobal.h
|
||||||
PATHS
|
PATHS
|
||||||
|
@ -14,7 +7,6 @@ FIND_PATH(QSCINTILLA_INCLUDE_DIR
|
||||||
$ENV{LIB_DIR}/include
|
$ENV{LIB_DIR}/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/include
|
/usr/include
|
||||||
${VCPKG_INSTALLED_DIR}/x64-windows/include
|
|
||||||
PATH_SUFFIXES ${QSCINTILLA_PATH_SUFFIXES}
|
PATH_SUFFIXES ${QSCINTILLA_PATH_SUFFIXES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,20 +29,4 @@ PATHS
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/local/lib/qt${QT_VERSION_MAJOR}
|
/usr/local/lib/qt${QT_VERSION_MAJOR}
|
||||||
/usr/lib
|
/usr/lib
|
||||||
${VCPKG_INSTALLED_DIR}/x64-windows/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
get_filename_component(QSCINTILLA_LIB_DIR ${QSCINTILLA_LIBRARY} DIRECTORY)
|
|
||||||
list(TRANSFORM QSCINTILLA_LIBRARY_NAMES APPEND ".dll" OUTPUT_VARIABLE QSCINTILLA_DLL_NAMES)
|
|
||||||
|
|
||||||
find_file(QSCINTILLA_DLLS
|
|
||||||
NAMES ${QSCINTILLA_DLL_NAMES}
|
|
||||||
PATHS
|
|
||||||
"${QT_LIBRARY_DIR}"
|
|
||||||
$ENV{LIB_DIR}/lib
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/local/lib/qt${QT_VERSION_MAJOR}
|
|
||||||
/usr/lib
|
|
||||||
${QSCINTILLA_LIB_DIR}
|
|
||||||
${VCPKG_INSTALLED_DIR}/x64-windows/lib
|
|
||||||
)
|
)
|
|
@ -14,7 +14,6 @@ include_directories(${Stb_INCLUDE_DIR})
|
||||||
# PkgConfig packages
|
# PkgConfig packages
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(LUAJIT REQUIRED luajit)
|
pkg_check_modules(LUAJIT REQUIRED luajit)
|
||||||
link_directories(${LUAJIT_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
# Run autogen
|
# Run autogen
|
||||||
file(GLOB_RECURSE AUTOGEN_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src" "src/objects/*.h" "src/datatypes/*.h")
|
file(GLOB_RECURSE AUTOGEN_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src" "src/objects/*.h" "src/datatypes/*.h")
|
||||||
|
@ -42,9 +41,8 @@ file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.h")
|
||||||
list(APPEND SOURCES ${AUTOGEN_OUTS})
|
list(APPEND SOURCES ${AUTOGEN_OUTS})
|
||||||
add_library(openblocks STATIC ${SOURCES})
|
add_library(openblocks STATIC ${SOURCES})
|
||||||
set_target_properties(openblocks PROPERTIES OUTPUT_NAME "openblocks")
|
set_target_properties(openblocks PROPERTIES OUTPUT_NAME "openblocks")
|
||||||
target_link_directories(openblocks PUBLIC ${LUAJIT_LIBRARY_DIRS})
|
|
||||||
target_link_libraries(openblocks ${GLEW_LIBRARIES} ${LUAJIT_LIBRARIES} OpenGL::GL ReactPhysics3D::ReactPhysics3D pugixml::pugixml)
|
target_link_libraries(openblocks ${GLEW_LIBRARIES} ${LUAJIT_LIBRARIES} OpenGL::GL ReactPhysics3D::ReactPhysics3D pugixml::pugixml)
|
||||||
target_include_directories(openblocks PUBLIC "src" "../include" ${LUAJIT_INCLUDE_DIRS})
|
target_include_directories(openblocks PUBLIC "src" "../include" ${LUAJIT_INCLUDE_DIR})
|
||||||
|
|
||||||
# Windows-specific dependencies
|
# Windows-specific dependencies
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <luajit.h>
|
#include <luajit-2.1/luajit.h>
|
||||||
#include <lauxlib.h>
|
#include <luajit-2.1/lauxlib.h>
|
||||||
#include <lualib.h>
|
#include <luajit-2.1/lualib.h>
|
||||||
#include <lua.h>
|
#include <luajit-2.1/lua.h>
|
||||||
}
|
}
|
|
@ -1,15 +0,0 @@
|
||||||
In order to build openblocks on Windows, qscintilla will need to already be installed.
|
|
||||||
|
|
||||||
To do this, first download the source archive from [`https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.14.1/QScintilla_src-2.14.1.tar.gz`](https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.14.1/QScintilla_src-2.14.1.tar.gz)
|
|
||||||
|
|
||||||
Next, launch the *x64 Native Tools Command Prompt for VS 2022*, and cd into the directory that you extracted the archive to
|
|
||||||
|
|
||||||
Now, run `qmake` from your Qt's bin directory to configure it
|
|
||||||
|
|
||||||
Once that's done, build and install the project using `nmake install`
|
|
||||||
|
|
||||||
The library should now automatically be installed into your Qt installed directory
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
To uninstall the library, run `nmake uninstall`
|
|
|
@ -99,13 +99,6 @@ if (WIN32)
|
||||||
# No sense adding opengl-sw given that hardware acceleration is necessary, anyway
|
# No sense adding opengl-sw given that hardware acceleration is necessary, anyway
|
||||||
# Also don't want to clutter with plugins, add only needed ones
|
# Also don't want to clutter with plugins, add only needed ones
|
||||||
|
|
||||||
# Copy over QScintilla DLLs
|
|
||||||
# TODO: Use a better approach?
|
|
||||||
add_custom_command(
|
|
||||||
TARGET editor POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${QSCINTILLA_DLLS} $<TARGET_FILE_DIR:editor>
|
|
||||||
)
|
|
||||||
|
|
||||||
# Copy qt.conf to override default plugins location
|
# Copy qt.conf to override default plugins location
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET editor POST_BUILD
|
TARGET editor POST_BUILD
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
{ "name": "pugixml", "version>=": "1.15" },
|
{ "name": "pugixml", "version>=": "1.15" },
|
||||||
"sdl2",
|
"sdl2",
|
||||||
"stb",
|
"stb",
|
||||||
"reactphysics3d",
|
"reactphysics3d"
|
||||||
"pkgconf",
|
|
||||||
"luajit"
|
|
||||||
],
|
],
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue