Reactivate editor building

This commit is contained in:
Azamat H. Hackimov 2024-08-21 17:29:14 +03:00
parent 4aa17f36d4
commit 1fdffe1700
2 changed files with 6 additions and 6 deletions

View File

@ -558,7 +558,6 @@ set(SOURCE
WorldTexturesDialog.cpp
WorldWeaponsDialog.cpp
editor.rc
../Descent3/sdlmain.cpp
)
set(CMAKE_MFC_FLAG 1)
@ -568,7 +567,12 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB:
add_executable(Descent3Editor WIN32 ${HEADERS} ${SOURCE})
target_include_directories(Descent3Editor PRIVATE ../lib ../ ../manage/ ${PROJECT_BINARY_DIR}/lib)
target_include_directories(Descent3Editor PRIVATE
${PROJECT_SOURCE_DIR}/lib
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/manage
${PROJECT_BINARY_DIR}/lib
)
target_compile_definitions(Descent3Editor PUBLIC _AFXDLL EDITOR)

View File

@ -105,11 +105,7 @@ FnPtr<Ret(Args...)>::FnPtr(std::string_view name, bool optional) : fn_{} {
static module *LoadOpenGLDLL(const char *dllname) {
mprintf(0, "Loading OpenGL dll...\n");
std::filesystem::path tmp = std::filesystem::current_path();
std::filesystem::current_path(orig_pwd);
int rc = SDL_GL_LoadLibrary(dllname[0] ? dllname : nullptr);
std::filesystem::current_path(tmp);
if (rc < 0) {
const char *sdlErr = SDL_GetError();