Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Commit

Permalink
I think I'm supposed to commit more often
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkingRobot committed Apr 12, 2020
1 parent de9f0f8 commit 6aeea49
Show file tree
Hide file tree
Showing 47 changed files with 9,033 additions and 329 deletions.
52 changes: 45 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,52 @@
cmake_minimum_required (VERSION 3.8)
cmake_minimum_required (VERSION 3.9.2)

project ("EGL2")
project (EGL2)

set(WITH_GUI ON CACHE BOOL "Compile with a GUI" FORCE)
set(WX_DIR "J:\\Code\\wxWidgets" CACHE PATH "wxWidgets directory" FORCE)
message(${WX_DIR})

aux_source_directory(. FILE_SOURCES)
aux_source_directory(memfs MEMFS_FILE_SOURCES)
aux_source_directory(filesystem FILESYSTEM_FILE_SOURCES)
aux_source_directory(storage STORAGE_FILE_SOURCES)
aux_source_directory(web WEB_FILE_SOURCES)

if (WITH_GUI)
message("Building with GUI")

aux_source_directory(gui INTERFACE_FILE_SOURCES)
add_executable(EGL2 WIN32 ${INTERFACE_FILE_SOURCES} "gui/resources.rc" ${FILESYSTEM_FILE_SOURCES} ${STORAGE_FILE_SOURCES} ${WEB_FILE_SOURCES} ${FILE_SOURCES})

set(wxWidgets_ROOT_DIR "${WX_DIR}")
set(wxWidgets_LIB_DIR "${WX_DIR}/lib/vc_x64_lib")
set(wxWidgets_EXCLUDE_COMMON_LIBRARIES TRUE)

add_executable (EGL2 ${MEMFS_FILE_SOURCES} ${FILE_SOURCES})
if (CMAKE_BUILD_TYPE EQUAL "DEBUG")
set(wxWidgets_USE_DEBUG ON)
else()
set(wxWidgets_USE_DEBUG OFF)
endif()

set(wxWidgets_USE_STATIC ON)
set(wxWidgets_USE_UNICODE ON)

find_package(wxWidgets REQUIRED COMPONENTS core base png zlib)
include(${wxWidgets_USE_FILE})
target_link_libraries(EGL2 PUBLIC ${wxWidgets_LIBRARIES})
else()
message("Building without GUI")

aux_source_directory(cmd INTERFACE_FILE_SOURCES)
add_executable(EGL2 ${INTERFACE_FILE_SOURCES} ${FILESYSTEM_FILE_SOURCES} ${STORAGE_FILE_SOURCES} ${WEB_FILE_SOURCES} ${FILE_SOURCES})
endif()

set_property(TARGET EGL2 PROPERTY CXX_STANDARD 20)

target_include_directories(EGL2 PRIVATE "$ENV{ProgramFiles\(x86\)}\\WinFsp\\inc")
target_link_libraries(EGL2 "$ENV{ProgramFiles\(x86\)}\\WinFsp\\lib\\winfsp-x64.lib")
configure_file(winfsp-x64.dll winfsp-x64.dll COPYONLY)
find_package(OpenSSL REQUIRED)
find_package(RapidJSON CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(lz4 REQUIRED)

target_link_options(EGL2 PRIVATE "/DELAYLOAD:winfsp-x64.dll")
target_include_directories(EGL2 PRIVATE "$ENV{ProgramFiles\(x86\)}\\WinFsp\\inc" ${RAPIDJSON_INCLUDE_DIRS} "libdeflate")
target_link_libraries(EGL2 PRIVATE "$ENV{ProgramFiles\(x86\)}\\WinFsp\\lib\\winfsp-x64.lib" OpenSSL::SSL OpenSSL::Crypto Crypt32 ZLIB::ZLIB lz4::lz4 delayimp "${CMAKE_CURRENT_SOURCE_DIR}\\libdeflate\\libdeflatestatic.lib")
19 changes: 16 additions & 3 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [ ]
},
{
"name": "x64-RelDbg",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
},
{
Expand All @@ -18,10 +30,11 @@
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}
Loading

0 comments on commit 6aeea49

Please sign in to comment.