|
|
|
@ -8,7 +8,9 @@ cmake_minimum_required(VERSION 3.10) |
|
|
|
|
# |
|
|
|
|
project("Adventures in Lestoria") |
|
|
|
|
|
|
|
|
|
if (EMSCRIPTEN) |
|
|
|
|
add_compile_options("-s" "USE_FREETYPE=1") |
|
|
|
|
endif() |
|
|
|
|
add_compile_options("-O2") |
|
|
|
|
|
|
|
|
|
# Options you can set via command-line |
|
|
|
@ -84,6 +86,12 @@ file( |
|
|
|
|
GLOB SOURCE_CXX_FILES |
|
|
|
|
"${SOURCE_CXX_SRC_DIR}/*.cpp" |
|
|
|
|
) |
|
|
|
|
file( |
|
|
|
|
GLOB SOURCE_CXX_FILES2 |
|
|
|
|
"${SOURCE_CXX_SRC_DIR}/discord-files/*.cpp" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
list(APPEND SOURCE_CXX_FILES ${SOURCE_CXX_FILES2}) |
|
|
|
|
|
|
|
|
|
# Search in the "cmake" directory for additional CMake modules. |
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
|
|
|
@ -244,6 +252,13 @@ if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN) |
|
|
|
|
target_link_libraries(${OutputExecutable} Threads::Threads) |
|
|
|
|
include_directories(${Threads_INCLUDE_DIRS}) |
|
|
|
|
|
|
|
|
|
find_package(Freetype REQUIRED) |
|
|
|
|
target_link_libraries(${OutputExecutable} ${FREETYPE_LIBRARIES}) |
|
|
|
|
target_include_directories(${OutputExecutable} PRIVATE ${FREETYPE_INCLUDE_DIRS}) |
|
|
|
|
|
|
|
|
|
target_include_directories(${OutputExecutable} PRIVATE "${C_CXX_SOURCES_DIR}/discord-files") |
|
|
|
|
link_directories("Adventures in Lestoria") |
|
|
|
|
|
|
|
|
|
# TODO: sanity checks |
|
|
|
|
|
|
|
|
|
if(USE_ALSA) |
|
|
|
@ -277,6 +292,11 @@ if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN) |
|
|
|
|
|
|
|
|
|
# stdc++fs |
|
|
|
|
target_link_libraries(${OutputExecutable} stdc++fs) |
|
|
|
|
target_link_options( |
|
|
|
|
${OutputExecutable} |
|
|
|
|
PRIVATE |
|
|
|
|
-g |
|
|
|
|
"Adventures in Lestoria/discord_game_sdk.so") |
|
|
|
|
|
|
|
|
|
endif() # Linux |
|
|
|
|
|
|
|
|
@ -284,7 +304,6 @@ endif() # Linux |
|
|
|
|
# Emscripten |
|
|
|
|
###################################################################### |
|
|
|
|
if (EMSCRIPTEN) |
|
|
|
|
|
|
|
|
|
# Generate an HTML file |
|
|
|
|
set(CMAKE_EXECUTABLE_SUFFIX .html) |
|
|
|
|
|
|
|
|
|