From a854a11dc3f572d02b5db573f51c5eac75d6f8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timmy=20Sj=C3=B6stedt?= Date: Sat, 16 Aug 2014 00:19:04 +0200 Subject: [PATCH 1/4] Added linking to iconv TODO make it cmake-y --- rwgame/CMakeLists.txt | 2 +- rwviewer/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rwgame/CMakeLists.txt b/rwgame/CMakeLists.txt index 61798387..fe6a648f 100644 --- a/rwgame/CMakeLists.txt +++ b/rwgame/CMakeLists.txt @@ -12,6 +12,6 @@ add_executable(rwgame include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" ${BULLET_INCLUDE_DIR}) -target_link_libraries( rwgame rwengine sfml-graphics sfml-window sfml-system GL GLEW ${BULLET_LIBRARIES} ) +target_link_libraries( rwgame rwengine sfml-graphics sfml-window sfml-system GL GLEW ${BULLET_LIBRARIES} iconv ) install(TARGETS rwgame RUNTIME DESTINATION bin) diff --git a/rwviewer/CMakeLists.txt b/rwviewer/CMakeLists.txt index 433d4049..038dcbca 100644 --- a/rwviewer/CMakeLists.txt +++ b/rwviewer/CMakeLists.txt @@ -17,7 +17,7 @@ add_executable(rwviewer include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" ${BULLET_INCLUDE_DIR}) -target_link_libraries(rwviewer rwengine sfml-graphics sfml-system GL GLEW ${BULLET_LIBRARIES}) +target_link_libraries(rwviewer rwengine sfml-graphics sfml-system GL GLEW ${BULLET_LIBRARIES} iconv) qt5_use_modules(rwviewer Widgets OpenGL) install(TARGETS rwviewer RUNTIME DESTINATION bin) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cbaf121d..bd6eda85 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,6 +9,6 @@ find_package(Boost COMPONENTS unit_test_framework REQUIRED) include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" "${CMAKE_SOURCE_DIR}/rwgame" /usr/include/bullet) -target_link_libraries(run_tests rwengine sfml-window sfml-system sfml-graphics GL GLEW BulletDynamics BulletCollision LinearMath ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(run_tests rwengine sfml-window sfml-system sfml-graphics GL GLEW BulletDynamics BulletCollision LinearMath ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} iconv) add_test(UnitTests run_tests) From 460473f4617a9e9e701830d11e42e0d09ac32ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timmy=20Sj=C3=B6stedt?= Date: Sat, 16 Aug 2014 00:20:13 +0200 Subject: [PATCH 2/4] Link OpenGL with CMake find package. --- CMakeLists.txt | 1 + rwgame/CMakeLists.txt | 2 +- rwviewer/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4299a01..34086248 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ ENDIF() # Make GLM use radians add_definitions(-DGLM_FORCE_RADIANS) +find_package(OpenGL REQUIRED) find_package(Bullet REQUIRED) IF(BUILD_OLD_TOOLS) diff --git a/rwgame/CMakeLists.txt b/rwgame/CMakeLists.txt index fe6a648f..7e7f9ab9 100644 --- a/rwgame/CMakeLists.txt +++ b/rwgame/CMakeLists.txt @@ -12,6 +12,6 @@ add_executable(rwgame include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" ${BULLET_INCLUDE_DIR}) -target_link_libraries( rwgame rwengine sfml-graphics sfml-window sfml-system GL GLEW ${BULLET_LIBRARIES} iconv ) +target_link_libraries( rwgame rwengine sfml-graphics sfml-window sfml-system ${OPENGL_LIBRARIES} GLEW ${BULLET_LIBRARIES} iconv ) install(TARGETS rwgame RUNTIME DESTINATION bin) diff --git a/rwviewer/CMakeLists.txt b/rwviewer/CMakeLists.txt index 038dcbca..025f771e 100644 --- a/rwviewer/CMakeLists.txt +++ b/rwviewer/CMakeLists.txt @@ -17,7 +17,7 @@ add_executable(rwviewer include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" ${BULLET_INCLUDE_DIR}) -target_link_libraries(rwviewer rwengine sfml-graphics sfml-system GL GLEW ${BULLET_LIBRARIES} iconv) +target_link_libraries(rwviewer rwengine sfml-graphics sfml-system ${OPENGL_LIBRARIES} GLEW ${BULLET_LIBRARIES} iconv) qt5_use_modules(rwviewer Widgets OpenGL) install(TARGETS rwviewer RUNTIME DESTINATION bin) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bd6eda85..7e29f932 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,6 +9,6 @@ find_package(Boost COMPONENTS unit_test_framework REQUIRED) include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" "${CMAKE_SOURCE_DIR}/rwgame" /usr/include/bullet) -target_link_libraries(run_tests rwengine sfml-window sfml-system sfml-graphics GL 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} iconv) add_test(UnitTests run_tests) From 70cadb7a86962e1477c0ab8844ca1b09efba2389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timmy=20Sj=C3=B6stedt?= Date: Sat, 16 Aug 2014 00:20:58 +0200 Subject: [PATCH 3/4] Fixed another Bullet inclusion path. --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7e29f932..a9aec272 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,7 +7,7 @@ include_directories(include) find_package(Boost COMPONENTS unit_test_framework REQUIRED) -include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" "${CMAKE_SOURCE_DIR}/rwgame" /usr/include/bullet) +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) From 7dde2af9f3e00bdbb8d526d80dcebc489126e118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timmy=20Sj=C3=B6stedt?= Date: Sat, 16 Aug 2014 00:21:12 +0200 Subject: [PATCH 4/4] Added to ScriptTypes. --- rwengine/include/script/ScriptTypes.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rwengine/include/script/ScriptTypes.hpp b/rwengine/include/script/ScriptTypes.hpp index bb0c11a9..f25918c0 100644 --- a/rwengine/include/script/ScriptTypes.hpp +++ b/rwengine/include/script/ScriptTypes.hpp @@ -3,6 +3,7 @@ #define _SCRIPTTYPES_HPP_ #include #include +#include #include #include