Skip to content

Commit

Permalink
Merge pull request #6 from Deamon87/vulkan-single-upload
Browse files Browse the repository at this point in the history
changes for 0.0.1
  • Loading branch information
Deamon87 authored Jan 9, 2020
2 parents e8caed6 + 8c52f60 commit 8775a2c
Show file tree
Hide file tree
Showing 162 changed files with 46,041 additions and 4,254 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@
[submodule "wowViewerLib/shaders/3rdparty/spirv-cross"]
path = wowViewerLib/shaders/3rdparty/spirv-cross
url = https://github.com/KhronosGroup/SPIRV-Cross.git
[submodule "3rdparty/SQLiteCpp"]
path = 3rdparty/SQLiteCpp
url = https://github.com/SRombauts/SQLiteCpp.git
1 change: 1 addition & 0 deletions 3rdparty/SQLiteCpp
Submodule SQLiteCpp added at 8329e7
55 changes: 49 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,30 @@ if (WIN32 AND MSVC)
endif()

#set(CMAKE_BUILD_TYPE Release)
#set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
#set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DFUCK ")
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -DFUCK ")

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -static -femulated-tls ")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -static -femulated-tls -std=c++1z")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -static -femulated-tls ")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -static -femulated-tls -std=c++1z")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
link_libraries(stdc++fs)
endif()

#set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pthread")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pthread -s")

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pthread")
if(WIN32)
link_libraries(wsock32 ws2_32)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
link_libraries(libws2_32.a)
endif()

#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG -pthread")

Expand Down Expand Up @@ -152,14 +171,26 @@ set(SOURCE_FILES
src/persistance/CascRequestProcessor.cpp
src/persistance/CascRequestProcessor.h
src/persistance/HttpRequestProcessor.cpp
src/persistance/HttpRequestProcessor.h)
src/persistance/HttpRequestProcessor.h

src/ui/imguiLib/imgui.cpp
src/ui/imguiLib/imgui_demo.cpp
src/ui/imguiLib/imgui_draw.cpp
src/ui/imguiLib/imgui_widgets.cpp
src/ui/imguiLib/imguiImpl/imgui_impl_glfw.cpp
src/ui/imguiLib/imguiImpl/imgui_impl_opengl2.cpp
src/ui/imguiLib/imguiImpl/imgui_impl_opengl3.cpp
src/ui/FrontendUI.cpp src/ui/FrontendUI.h
src/database/CSqliteDB.cpp src/database/CSqliteDB.h
)


if (NOT CMAKE_NDK_BUILD MATCHES 1)
set(SOURCE_FILES ${SOURCE_FILES}
src/main.cpp)
else()
set(SOURCE_FILES ${SOURCE_FILES}
src/jniLib.cpp)
src/jniLib.cpp src/database/dbStructs.h)
endif()


Expand Down Expand Up @@ -199,7 +230,12 @@ if(CMAKE_USE_PTHREADS_INIT)
endif()


add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/SQLiteCpp)

add_executable(AWebWoWViewerCpp ${SOURCE_FILES})
#target_compile_options(AWebWoWViewerCpp PRIVATE "-static")

target_include_directories(AWebWoWViewerCpp PUBLIC src/ui/imguiLib)


add_dependencies(AWebWoWViewerCpp zip)
Expand All @@ -220,6 +256,13 @@ target_link_libraries(AWebWoWViewerCpp ${OPENGL_LIBRARIES})
target_link_libraries(AWebWoWViewerCpp ${OPENGL_LIB})
#target_link_libraries(AWebWoWViewerCpp zip)
target_link_libraries(AWebWoWViewerCpp zlib)
target_link_libraries(AWebWoWViewerCpp SQLiteCpp sqlite3)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" )
target_link_libraries(AWebWoWViewerCpp ssp)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" )
target_link_libraries(AWebWoWViewerCpp ssp)
endif()
target_link_libraries(AWebWoWViewerCpp WoWViewerLib)

target_link_libraries(AWebWoWViewerCpp Threads::Threads)
Expand Down
10 changes: 6 additions & 4 deletions emscripten_port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ project(WoWWebViewerJs)

include(CheckCXXCompilerFlag)

message( EMSCRIPTEN_ROOT = emc${EMSCRIPTEN_ROOT})

set(CMAKE_C_COMPILER /home/deamon/Downloads/emsdk-master/upstream/emscripten/emcc)
set(CMAKE_CXX_COMPILER /home/deamon/Downloads/emsdk-master/upstream/emscripten/em++)

check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17)
if(HAVE_FLAG_STD_CXX17)
# Have -std=c++17, use it
Expand All @@ -22,6 +27,7 @@ else()
endif()
endif()

set(EMSCRIPTEN 1)

add_subdirectory(../wowViewerLib ${CMAKE_CURRENT_BINARY_DIR}/A)

Expand All @@ -35,8 +41,4 @@ add_library(AWoWWebViewerJs ${SOURCE_FILES})
add_dependencies(AWoWWebViewerJs WoWViewerLib)
target_link_libraries(AWoWWebViewerJs WoWViewerLib)





INSTALL(TARGETS AWoWWebViewerJs DESTINATION BIN)
Loading

0 comments on commit 8775a2c

Please sign in to comment.