Skip to content

Commit

Permalink
Back to previous cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
WurAFox committed Jan 2, 2025
1 parent 57f8762 commit b0618ed
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ set(CMAKE_CXX_STANDARD 17)

set(CMAKE_AUTOUIC_SEARCH_PATHS src/ui)
set(CMAKE_AUTOUIC ON)
set(LIBFOXOGRAM_INSTALL OFF)
set(IXWEBSOCKET_INSTALL OFF)
if(APPLE)
set(OpenSSL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/foxogram.app/Contents/Frameworks/")
endif ()

if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT DEFINED CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
Expand Down Expand Up @@ -81,22 +82,8 @@ install(TARGETS foxogram
)

install(SCRIPT ${deploy_script})
if (WIN32)
find_package(OpenSSL COMPONENTS SSL Crypto REQUIRED)
if(OPENSSL_VERSION VERSION_GREATER_EQUAL "3.0.0")
set(openssldlls "${OPENSSL_INCLUDE_DIR}/../libssl-3-x64.dll;${OPENSSL_INCLUDE_DIR}/../libcrypto-3-x64.dll")
else ()
set(openssldlls "${OPENSSL_INCLUDE_DIR}/../libssl-1_1-x64.dll;${OPENSSL_INCLUDE_DIR}/../libcrypto-1_1-x64.dll")
endif ()
install(FILES ${openssldlls}
DESTINATION ${CMAKE_INSTALL_BINDIR})
elseif (UNIX)
install(FILES ${OPENSSL_LIBRARIES}
DESTINATION ${CMAKE_INSTALL_BINDIR})
elseif (APPLE)
if (APPLE)
install(CODE "execute_process(COMMAND cp \"${OPENSSL_SSL_LIBRARY}\" \"${CMAKE_INSTALL_PREFIX}/foxogram.app/Contents/Frameworks/libssl.3.dylib\")
execute_process(COMMAND cp \"${OPENSSL_CRYPTO_LIBRARY}\" \"${CMAKE_INSTALL_PREFIX}/foxogram.app/Contents/Frameworks/libcrypto.3.dylib\")
message(cp \"${OPENSSL_SSL_LIBRARY}\" \"${CMAKE_INSTALL_PREFIX}/foxogram.app/Contents/Frameworks/libssl.3.dylib\")
execute_process(COMMAND cp \"${OPENSSL_CRYPTO_LIBRARY}\" \"${CMAKE_INSTALL_PREFIX}/foxogram.app/Contents/Frameworks/libcrypto.3.dylib\")")
endif()
set(CPACK_BUNDLE_STARTUP_COMMAND ${PROJECT_BINARY_DIR}/startup.sh)

0 comments on commit b0618ed

Please sign in to comment.