86 lines
2.4 KiB
CMake
86 lines
2.4 KiB
CMake
############# README ############# README ############# README ############
|
|
# Option to choose between shared or static library
|
|
# Pass this as an argument as follows when configuring the project:
|
|
# `cmake -S . -B build
|
|
# then build it with either `Release` or `Debug` option:
|
|
# `cmake --build build --config Release`
|
|
############ /README ############ /README ############ /README ############
|
|
|
|
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(musa-explorer-cpp)
|
|
|
|
# Use C++11
|
|
SET (CMAKE_CXX_STANDARD 11)
|
|
SET (CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
|
if (MSVC)
|
|
# Suppress warning: C++ exception handler used, but unwind semantics are not enabled.
|
|
add_compile_options(/wd4530)
|
|
add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
|
|
add_compile_options(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
|
add_compile_options(-D_CRT_NONSTDC_NO_DEPRECATE)
|
|
endif()
|
|
|
|
SET (EXE_NAME "mexplore_v2")
|
|
|
|
SET (SRC_FILES
|
|
lib/third_party/dear-imgui/imgui.cpp
|
|
lib/third_party/dear-imgui/imgui_widgets.cpp
|
|
lib/third_party/dear-imgui/imgui_draw.cpp
|
|
lib/third_party/dear-imgui/imgui_tables.cpp
|
|
lib/third_party/dear-imgui/imgui_impl_dx11.cpp
|
|
lib/third_party/dear-imgui/imgui_impl_win32.cpp
|
|
|
|
#exe_main.cpp
|
|
lib/Base/Base.cpp
|
|
lib/Base/Base_Thread_Context.cpp
|
|
lib/Base/Allocator.cpp
|
|
lib/Base/Arena.cpp
|
|
lib/Base/String.cpp
|
|
lib/Base/ErrorType.cpp
|
|
lib/Base/Logger.cpp
|
|
lib/Base/Expandable_Arena.cpp
|
|
#lib/Base/General_Purpose_Allocator.cpp
|
|
#lib/Base/Threads.cpp
|
|
#lib/OS/OS_Filesystem.cpp
|
|
#lib/Base/Thread_Group.cpp
|
|
#lib/Base/Unicode.cpp
|
|
#lib/Base/RadixSort.cpp
|
|
#lib/OS/OS_Win32.cpp
|
|
|
|
#lib/Base/run_tests.cpp
|
|
#src/ImGui_Supplementary.cpp
|
|
#src/String_Analysis.cpp
|
|
#src/explorer_main.cpp
|
|
#src/Base_Entry_Point.cpp
|
|
|
|
# Not in main project: for future opengl backend
|
|
#lib/Graphics.cpp
|
|
)
|
|
|
|
SET (INCLUDE_DIRS
|
|
${PROJECT_SOURCE_DIR}/src
|
|
${PROJECT_SOURCE_DIR}/lib
|
|
${PROJECT_SOURCE_DIR}/lib/Base
|
|
${PROJECT_SOURCE_DIR}/lib/OS
|
|
${PROJECT_SOURCE_DIR}/lib/UI
|
|
${PROJECT_SOURCE_DIR}/lib/third_party
|
|
)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
SET (LINK_LIB_DIRS
|
|
)
|
|
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
SET (LINK_LIB_DIRS
|
|
)
|
|
endif()
|
|
|
|
SET (SYSTEM_LIBRARIES
|
|
)
|
|
|
|
#add_executable(${EXE_NAME} ${SRC_FILES})
|
|
add_library(${EXE_NAME} STATIC ${SRC_FILES})
|
|
target_include_directories(${EXE_NAME} PRIVATE ${INCLUDE_DIRS})
|
|
target_link_libraries(${EXE_NAME} PRIVATE ${LINK_LIBS_DIRS} ${SYSTEM_LIBRARIES})
|