add a few cmakefiles for c engine and rtl webgl
authorkoda
Fri, 09 Nov 2012 14:40:40 +0000
branchwebgl
changeset 7999 bb503cd46516
parent 7997 7dff08baf9e3
child 8001 379063958821
add a few cmakefiles for c engine and rtl
.hgignore
CMakeLists.txt
project_files/hwc/CMakeLists.txt
project_files/hwc/rtl/CMakeLists.txt
--- a/.hgignore	Fri Nov 09 14:32:54 2012 +0000
+++ b/.hgignore	Fri Nov 09 14:40:40 2012 +0000
@@ -39,6 +39,8 @@
 glob:*.orig
 glob:*.bak
 glob:*.rej
+glob:project_files/hwc/*.c
+glob:project_files/hwc/*.h
 glob:project_files/Android-build/SDL-android-project/jni/**
 glob:project_files/Android-build/SDL-android-project/obj
 glob:project_files/Android-build/SDL-android-project/libs/armeabi*
--- a/CMakeLists.txt	Fri Nov 09 14:32:54 2012 +0000
+++ b/CMakeLists.txt	Fri Nov 09 14:40:40 2012 +0000
@@ -252,6 +252,7 @@
     endif()
     #pascal to c converter
     add_subdirectory(tools/pas2c)
+    add_subdirectory(project_files/hwc)
 else()
     #main pascal engine
     add_subdirectory(hedgewars)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/hwc/CMakeLists.txt	Fri Nov 09 14:40:40 2012 +0000
@@ -0,0 +1,20 @@
+
+configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
+
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/hwengine.c"
+        COMMAND "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}"
+        ARGS -n hwengine -i "${hedgewars_SOURCE_DIR}/hedgewars" -o "${CMAKE_CURRENT_BINARY_DIR}" -a ./
+        DEPENDS pas2c
+        )
+
+add_custom_target(engine_c ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/hwengine.c")
+
+add_subdirectory(rtl)
+
+find_package(GLEW REQUIRED)
+message("${GLEW_INCLUDE_PATH}")
+
+include_directories(rtl)
+file(GLOB engine_src *.c)
+add_executable(hwengine WIN32 ${engine_src})
+add_dependencies(hwengine engine_c fpcrtl)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/hwc/rtl/CMakeLists.txt	Fri Nov 09 14:40:40 2012 +0000
@@ -0,0 +1,19 @@
+
+set(fpcrtl_src  fileio.c
+                misc.c
+                pmath.c
+                system.c
+                sysutils.c
+)
+
+add_library(fpcrtl ${fpcrtl_src})
+
+if(WEBGL)
+    set_target_properties(fpcrtl PROPERTIES PREFIX "em")
+    set_target_properties(fpcrtl PROPERTIES SUFFIX ".bc")
+endif(WEBGL)
+
+
+
+
+