mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-22 20:45:11 +00:00
guess work
This commit is contained in:
parent
d005d00c53
commit
840419ac7b
2 changed files with 33 additions and 38 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -238,10 +238,14 @@ jobs:
|
||||||
echo "making dirs"
|
echo "making dirs"
|
||||||
mkdir new
|
mkdir new
|
||||||
|
|
||||||
|
make DESTDIR=final install
|
||||||
|
|
||||||
|
ls final
|
||||||
|
|
||||||
echo "TODO: code sign..."
|
echo "TODO: code sign..."
|
||||||
|
|
||||||
echo "copying"
|
echo "copying"
|
||||||
cp -v -r furnace.app new/furnace.app
|
cp -v -r final/Applications/furnace.app new/furnace.app
|
||||||
echo "synchronizing"
|
echo "synchronizing"
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
|
|
@ -1188,44 +1188,53 @@ if (MAKE_BUNDLE AND NOT FORCE_APPLE_BIN)
|
||||||
list(APPEND USED_SOURCES ${LOCALE_FILES})
|
list(APPEND USED_SOURCES ${LOCALE_FILES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID AND NOT TERMUX)
|
if (MAKE_BUNDLE)
|
||||||
add_library(furnace SHARED ${USED_SOURCES})
|
set(FURNACE Furnace)
|
||||||
elseif(WIN32 AND NOT CONSOLE_SUBSYSTEM)
|
|
||||||
add_executable(furnace WIN32 ${USED_SOURCES})
|
|
||||||
else()
|
else()
|
||||||
add_executable(furnace ${USED_SOURCES})
|
set(FURNACE furnace)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ANDROID AND NOT TERMUX)
|
||||||
|
add_library(${FURNACE} SHARED ${USED_SOURCES})
|
||||||
|
elseif(WIN32 AND NOT CONSOLE_SUBSYSTEM)
|
||||||
|
add_executable(${FURNACE} WIN32 ${USED_SOURCES})
|
||||||
|
else()
|
||||||
|
add_executable(${FURNACE} ${USED_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MAKE_BUNDLE AND NOT FORCE_APPLE_BIN)
|
if (MAKE_BUNDLE AND NOT FORCE_APPLE_BIN)
|
||||||
set_target_properties(furnace PROPERTIES MACOSX_BUNDLE True MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/Info.plist RESOURCE "${LOCALE_FILES}")
|
set_target_properties(${FURNACE} PROPERTIES
|
||||||
|
MACOSX_BUNDLE True
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/Info.plist
|
||||||
|
RESOURCE "${LOCALE_FILES}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(furnace SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS})
|
target_include_directories(${FURNACE} SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS})
|
||||||
target_compile_options(furnace PRIVATE ${DEPENDENCIES_COMPILE_OPTIONS})
|
target_compile_options(${FURNACE} PRIVATE ${DEPENDENCIES_COMPILE_OPTIONS})
|
||||||
target_link_libraries(furnace PRIVATE ${DEPENDENCIES_LIBRARIES})
|
target_link_libraries(${FURNACE} PRIVATE ${DEPENDENCIES_LIBRARIES})
|
||||||
if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYSTEM_SDL2 OR SYSTEM_RTMIDI OR WITH_JACK))
|
if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYSTEM_SDL2 OR SYSTEM_RTMIDI OR WITH_JACK))
|
||||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.13")
|
if ("${CMAKE_VERSION}" VERSION_LESS "3.13")
|
||||||
message(WARNING
|
message(WARNING
|
||||||
"CMake version is <3.13, using old pkg-config LDFLAGS. "
|
"CMake version is <3.13, using old pkg-config LDFLAGS. "
|
||||||
"You may encounter linking problems with these!"
|
"You may encounter linking problems with these!"
|
||||||
)
|
)
|
||||||
target_link_libraries(furnace PRIVATE ${DEPENDENCIES_LEGACY_LDFLAGS})
|
target_link_libraries(${FURNACE} PRIVATE ${DEPENDENCIES_LEGACY_LDFLAGS})
|
||||||
else()
|
else()
|
||||||
target_link_directories(furnace PRIVATE ${DEPENDENCIES_LIBRARY_DIRS})
|
target_link_directories(${FURNACE} PRIVATE ${DEPENDENCIES_LIBRARY_DIRS})
|
||||||
target_link_options(furnace PRIVATE ${DEPENDENCIES_LINK_OPTIONS})
|
target_link_options(${FURNACE} PRIVATE ${DEPENDENCIES_LINK_OPTIONS})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# why 3.16..... why not 3.0?
|
# why 3.16..... why not 3.0?
|
||||||
if (NOT "${CMAKE_VERSION}" VERSION_LESS "3.16")
|
if (NOT "${CMAKE_VERSION}" VERSION_LESS "3.16")
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
target_precompile_headers(furnace PUBLIC
|
target_precompile_headers(${FURNACE} PUBLIC
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/pch.h>
|
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/pch.h>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui_patched/imgui.h>
|
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui_patched/imgui.h>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui_patched/imgui_internal.h>
|
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui_patched/imgui_internal.h>
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
target_precompile_headers(furnace PUBLIC
|
target_precompile_headers(${FURNACE} PUBLIC
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/pch.h>
|
$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/pch.h>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1234,7 +1243,7 @@ endif()
|
||||||
if (NOT ANDROID OR TERMUX)
|
if (NOT ANDROID OR TERMUX)
|
||||||
if (NOT WIN32 AND NOT APPLE)
|
if (NOT WIN32 AND NOT APPLE)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
install(TARGETS furnace RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(TARGETS ${FURNACE} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
install(FILES res/furnace.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
install(FILES res/furnace.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||||
install(FILES res/mime.xml RENAME furnace.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
|
install(FILES res/mime.xml RENAME furnace.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
|
||||||
if (NOT DONT_HAVE_GIT)
|
if (NOT DONT_HAVE_GIT)
|
||||||
|
@ -1269,34 +1278,16 @@ if (NOT ANDROID OR TERMUX)
|
||||||
install(FILES res/logo.png RENAME furnace.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/1024x1024/apps)
|
install(FILES res/logo.png RENAME furnace.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/1024x1024/apps)
|
||||||
else()
|
else()
|
||||||
if (MAKE_BUNDLE)
|
if (MAKE_BUNDLE)
|
||||||
install(TARGETS furnace BUNDLE DESTINATION Applications)
|
install(TARGETS ${FURNACE} BUNDLE DESTINATION Applications)
|
||||||
else()
|
else()
|
||||||
install(TARGETS furnace RUNTIME DESTINATION bin)
|
install(TARGETS ${FURNACE} RUNTIME DESTINATION bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# ?!?!
|
# ?!?!
|
||||||
if (APPLE AND NOT FORCE_APPLE_BIN AND NOT MAKE_BUNDLE)
|
if (APPLE AND NOT FORCE_APPLE_BIN AND NOT MAKE_BUNDLE)
|
||||||
install(TARGETS furnace RESOURCE DESTINATION locale)
|
install(TARGETS ${FURNACE} RESOURCE DESTINATION locale)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "Furnace")
|
|
||||||
set(CPACK_PACKAGE_VENDOR "tildearrow")
|
|
||||||
set(CPACK_PACKAGE_DESCRIPTION "free and open-source chiptune tracker")
|
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
set(CPACK_GENERATOR Bundle)
|
|
||||||
set(CPACK_DMG_SLA_DIR ${CMAKE_SOURCE_DIR}/res/macLicense)
|
|
||||||
set(CPACK_DMG_SLA_LANGUAGES en)
|
|
||||||
set(CPACK_BUNDLE_NAME "Furnace")
|
|
||||||
set(CPACK_DMG_VOLUME_NAME "Furnace")
|
|
||||||
set(CPACK_BUNDLE_PLIST ${CMAKE_SOURCE_DIR}/res/Info.plist)
|
|
||||||
set(CPACK_BUNDLE_ICON ${CMAKE_SOURCE_DIR}/res/icon.icns)
|
|
||||||
set(CPACK_BUNDLE_STARTUP_COMMAND "furnace")
|
|
||||||
set(CPACK_BUNDLE_APPLE_CERT_APP "-")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(CPack)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES})
|
target_compile_definitions(${FURNACE} PRIVATE ${DEPENDENCIES_DEFINES})
|
||||||
|
|
Loading…
Reference in a new issue