cmake linking for engine in c webgl
authorkoda
Sun, 11 Nov 2012 17:52:49 +0100
branchwebgl
changeset 8029 7ba43d7e54e7
parent 8026 4a4f21070479
child 8032 f8fcece14302
cmake linking for engine in c
project_files/hwc/CMakeLists.txt
project_files/hwc/rtl/CMakeLists.txt
--- a/project_files/hwc/CMakeLists.txt	Sun Nov 11 17:15:19 2012 +0100
+++ b/project_files/hwc/CMakeLists.txt	Sun Nov 11 17:52:49 2012 +0100
@@ -20,8 +20,13 @@
 set(CMAKE_C_COMPILER ${clang_executable})
 
 
+find_package(OPENGL REQUIRED)
 find_package(GLEW REQUIRED)
-
+find_package(SDL REQUIRED)
+find_package(SDL_mixer REQUIRED)
+find_package(SDL_net REQUIRED)
+find_package(SDL_image REQUIRED)
+find_package(SDL_ttf REQUIRED)
 
 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
 
@@ -87,5 +92,16 @@
     )
 
 add_executable(hwengine WIN32 ${engine_src})
+
+target_link_libraries(hwengine  fpcrtl
+                                ${LUA_LIBRARY}
+                                ${OPENGL_LIBRARY}
+                                ${SDL_LIBRARY}
+                                ${SDLMIXER_LIBRARY}
+                                ${SDLNET_LIBRARY}
+                                ${SDLIMAGE_LIBRARY}
+                                ${SDLTTF_LIBRARY}
+                            )
+
 add_dependencies(hwengine engine_c fpcrtl)
 
--- a/project_files/hwc/rtl/CMakeLists.txt	Sun Nov 11 17:15:19 2012 +0100
+++ b/project_files/hwc/rtl/CMakeLists.txt	Sun Nov 11 17:52:49 2012 +0100
@@ -10,10 +10,10 @@
 
 add_library(fpcrtl ${fpcrtl_src})
 
-if(WEBGL)
-    set_target_properties(fpcrtl PROPERTIES PREFIX "em")
-    set_target_properties(fpcrtl PROPERTIES SUFFIX ".bc")
-endif(WEBGL)
+#if(WEBGL)
+#    set_target_properties(fpcrtl PROPERTIES PREFIX "em")
+#    set_target_properties(fpcrtl PROPERTIES SUFFIX ".bc")
+#endif(WEBGL)