mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
Improve CMake detection of platform libraries
This commit is contained in:
parent
c18badef48
commit
4d78cacd84
@ -19,6 +19,10 @@ ELSE()
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3" )
|
||||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
set(OPENRW_PLATFORM_LIBS iconv)
|
||||
ENDIF()
|
||||
|
||||
# Make GLM use radians
|
||||
add_definitions(-DGLM_FORCE_RADIANS)
|
||||
|
||||
|
@ -9,6 +9,11 @@ add_library(rwengine
|
||||
${RENDERWARE_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(rwengine sfml-window sfml-audio GLEW mad)
|
||||
target_link_libraries(rwengine
|
||||
sfml-window
|
||||
sfml-audio
|
||||
GLEW
|
||||
mad
|
||||
${OPENRW_PLATFORM_LIBS})
|
||||
|
||||
include_directories(include ${BULLET_INCLUDE_DIR})
|
||||
|
@ -12,6 +12,13 @@ add_executable(rwgame
|
||||
|
||||
include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" ${BULLET_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries( rwgame rwengine sfml-graphics sfml-window sfml-system ${OPENGL_LIBRARIES} GLEW ${BULLET_LIBRARIES} iconv )
|
||||
target_link_libraries( rwgame
|
||||
rwengine
|
||||
sfml-graphics
|
||||
sfml-window
|
||||
sfml-system
|
||||
${OPENGL_LIBRARIES}
|
||||
GLEW
|
||||
${BULLET_LIBRARIES})
|
||||
|
||||
install(TARGETS rwgame RUNTIME DESTINATION bin)
|
||||
|
@ -17,7 +17,13 @@ add_executable(rwviewer
|
||||
|
||||
include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" ${BULLET_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(rwviewer rwengine sfml-graphics sfml-system ${OPENGL_LIBRARIES} GLEW ${BULLET_LIBRARIES} iconv)
|
||||
target_link_libraries(rwviewer
|
||||
rwengine
|
||||
sfml-graphics
|
||||
sfml-system
|
||||
${OPENGL_LIBRARIES}
|
||||
GLEW
|
||||
${BULLET_LIBRARIES})
|
||||
qt5_use_modules(rwviewer Widgets OpenGL)
|
||||
|
||||
install(TARGETS rwviewer RUNTIME DESTINATION bin)
|
||||
|
@ -9,6 +9,16 @@ find_package(Boost COMPONENTS unit_test_framework REQUIRED)
|
||||
|
||||
include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" "${CMAKE_SOURCE_DIR}/rwgame" ${BULLET_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(run_tests rwengine sfml-window sfml-system sfml-graphics ${OPENGL_LIBRARIES} GLEW BulletDynamics BulletCollision LinearMath ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} iconv)
|
||||
target_link_libraries(run_tests
|
||||
rwengine
|
||||
sfml-window
|
||||
sfml-system
|
||||
sfml-graphics
|
||||
${OPENGL_LIBRARIES}
|
||||
GLEW
|
||||
BulletDynamics
|
||||
BulletCollision
|
||||
LinearMath
|
||||
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
|
||||
|
||||
add_test(UnitTests run_tests)
|
||||
|
Loading…
Reference in New Issue
Block a user