2020-12-22 17:10:01 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(libimhex)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
|
2020-12-27 13:12:53 +00:00
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/ImGui ${CMAKE_CURRENT_BINARY_DIR}/external/ImGui)
|
2021-01-11 20:51:52 +00:00
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json)
|
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
|
2021-01-06 18:19:01 +00:00
|
|
|
if (WIN32)
|
2021-01-12 22:28:41 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc")
|
2021-01-06 18:19:01 +00:00
|
|
|
endif()
|
2020-12-22 17:10:01 +00:00
|
|
|
|
2021-01-12 22:28:41 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
|
|
|
|
|
|
|
add_library(libimhex SHARED
|
2020-12-22 17:10:01 +00:00
|
|
|
source/helpers/event.cpp
|
2020-12-27 13:12:53 +00:00
|
|
|
source/helpers/utils.cpp
|
2021-01-11 19:31:40 +00:00
|
|
|
source/helpers/content_registry.cpp
|
2021-01-12 22:28:41 +00:00
|
|
|
source/helpers/shared_data.cpp
|
2020-12-27 13:12:53 +00:00
|
|
|
|
2021-01-11 22:54:12 +00:00
|
|
|
source/lang/preprocessor.cpp
|
|
|
|
source/lang/lexer.cpp
|
|
|
|
source/lang/parser.cpp
|
|
|
|
source/lang/validator.cpp
|
|
|
|
source/lang/evaluator.cpp
|
|
|
|
source/lang/builtin_functions.cpp
|
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
source/providers/provider.cpp
|
2020-12-27 13:12:53 +00:00
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
source/views/view.cpp
|
2020-12-27 13:12:53 +00:00
|
|
|
)
|
2020-12-22 17:10:01 +00:00
|
|
|
|
|
|
|
target_include_directories(libimhex PUBLIC include)
|
2021-01-11 20:51:52 +00:00
|
|
|
target_link_libraries(libimhex PUBLIC imgui nlohmann_json)
|