Skip to content

Commit

Permalink
fixup! Add CMake support
Browse files Browse the repository at this point in the history
  • Loading branch information
ltoenning committed Nov 11, 2023
1 parent efc7e86 commit 29fd049
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

cmake_policy(VERSION 3.21)

cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.26)

if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
Expand Down
6 changes: 5 additions & 1 deletion src/xswiftbus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ if(WIN32)
find_package(OpenGL REQUIRED)

target_link_libraries(xswiftbus PUBLIC ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} OpenGL::GL OpenGL::GLU)
else()
elseif(UNIX AND NOT APPLE)
target_link_libraries(xswiftbus PUBLIC ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
endif()

Expand All @@ -150,6 +150,10 @@ target_compile_definitions(xswiftbus PUBLIC XPMP_CLIENT_NAME="xswiftbus")
target_compile_definitions(xswiftbus PUBLIC XPMP_CLIENT_LONGNAME="xswiftbus")
target_compile_definitions(xswiftbus PUBLIC XSWIFTBUS_VERSION="${swift_version_major}.${swift_version_minor}.${swift_rev_count}")

if(APPLE)
set_target_properties(xswiftbus PROPERTIES INSTALL_RPATH @loader_path/)
endif()

include(${PROJECT_SOURCE_DIR}/cmake/xswiftbus_tools.cmake)
get_xswiftbus_commit_id()

Expand Down

0 comments on commit 29fd049

Please sign in to comment.