Any plans for OS X binary?
Been playing through Wine on OS X for years now, any plans for releasing an OS X binary?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Wargus Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
No because, stratagus developers do not using osx. And building (gcc) cross compiler for osx is not easy and needs osx sdk which is under some apple eula. So I am not able to create cross compiler which produce osx binaries. And I do not want to spend time for it. But if someone else will create and maintain osx binaries, I can upload it to project download page.
Revision history for this message
|
#2 |
Sorry to dig this up from the grave, but I have been able to create a Stratagus OSX binary.
Revision history for this message
|
#3 |
That's great Bradley,
Can you post some kind of "how-to" for OSX? What version of OSX did you compile it on?
Revision history for this message
|
#4 |
Feel free to share the binary here or on the Stratagus forums. :D
Revision history for this message
|
#5 |
I also provide the info& file are on my website @
( http://
and a extra mirror
http://
I will also paste is to the bottom of the post
This tutorial will be in three parts
Part 1:Setting up the build enviorment
A:Install Xcode from the Mac App Store
B:Open Xcode then
Main Menu -> Xcode -> Preferences -> Downloads -> Components -> Command Line Tools (Install)
C: Install Macports(http://
D: In terminal type
"sudo port install cmake libogg libvorbis libtheora libpng zlib libmikmod bzip2 libmng sqlite3 doxygen git-core bzr"
Note:This will take a while, it will have to install a lot of libraries and dependencies
You now have most of the essentials for development of Stratagus
Part 2:Getting Tolua++
A:Navigate to your development directory (where you want Stratagus stuff at)
B:Git clone from Luadists Github Repository
"git clone https:/
C:Navigate into the toluapp directory
"cd toluapp"
D:Create a build directory & open it
"mkdir build && cd build"
E:Generate the Unix Makefiles with cmake
"cmake -G "Unix Makefiles" .."
D:Make the Library & Install it systemwide
"make && sudo make install"
Now you have all the essentials for development of Stratagus
Part 3:Compiling Stratagus
NOTE:This will change in the future as I plan to make a Macport of toluapp
A:Navigate to your development directory (where you want Stratagus stuff)
B:Get the Stratagus source
"bzr branch lp:stratagus"
C:Navigate into the folder
"cd stratagus"
D:Replace CMakeLists.txt with the one I provide
E:Create a build directory and navigate to it
"mkdir build && cd build"
F:Generate the Unix Makefiles with cmake
"cmake -G "Unix Makefiles" .."
G:Compile the source
"make"
This will produce the targets that you can call to the Stratagus game of your choosing
"./stratagus -d "/path/to/wargus"
I hope this is helpful, sorry for being so long...
--Cmake File start--
# _________ __ __
# / _____// |_____________ _/ |______ ____ __ __ ______
# \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
# / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
# /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
# \/ \/ \//_____/ \/
# _______
# T H E W A R B E G I N S
# Stratagus - A free fantasy real time strategy game engine
#
# CMakeLists.txt
# Copyright (C) 2011-2012 Pali Rohár <email address hidden>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://
#
#
project(stratagus)
cmake_minimum_
set(STRATAGUS_
# Stratagus sources
include_
src/include
src/guichan/
src/guichan/
)
set(action_SRCS
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
src/action/
)
source_group(action FILES ${action_SRCS})
set(animation_SRCS
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
src/animation/
)
source_
set(ai_SRCS
src/ai/
src/ai/ai.cpp
src/ai/
src/ai/
src/ai/ai_plan.cpp
src/ai/
src/ai/
)
source_group(ai FILES ${ai_SRCS})
set(beos_SRCS
src/beos/beos.cpp
)
source_group(beos FILES ${beos_SRCS})
set(editor_SRCS
src/editor/
src/editor/
src/editor/
src/editor/
)
source_group(editor FILES ${editor_SRCS})
set(game_SRCS
src/game/game.cpp
src/game/
src/game/
src/game/
src/game/
)
source_group(game FILES ${game_SRCS})
set(guichan_SRCS
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
# src/guichan/
# src/guichan/
# src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
)
source_
set(maemo_SRCS
src/maemo/
)
source_group(maemo FILES ${maemo_SRCS})
set(map_SRCS
src/map/map.cpp
src/map/
src/map/
src/map/
src/map/
src/map/
src/map/
src/map/
src/map/
src/map/
)
source_group(map FILES ${map_SRCS})
set(missile_SRCS
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
src/missile/
)
source_
set(network_SRCS
src/network/
src/network/
src/network/
src/network/
src/network/
)
source_
set(particle_SRCS
src/particle/
src/particle/
src/particle/
src/particle/
src/particle/
src/particle/
)
source_
set(pathfinder_SRCS
src/pathfinder
src/pathfinder
src/pathfinder
)
source_
set(sound_SRCS
src/sound/
src/sound/
src/sound/ogg.cpp
src/sound/
src/sound/
src/sound/
src/sound/
src/sound/
src/sound/wav.cpp
)
source_group(sound FILES ${sound_SRCS})
set(spell_SRCS
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
src/spell/
)
source_group(spell FILES ${spell_SRCS})
set(stratagusma
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
src/stratagus/
)
source_
set(ui_SRCS
src/ui/
src/ui/
src/ui/icons.cpp
src/ui/
src/ui/mainscr.cpp
src/ui/
src/ui/mouse.cpp
src/ui/
src/ui/ui.cpp
src/ui/widgets.cpp
)
source_group(ui FILES ${ui_SRCS})
set(unit_SRCS
src/unit/build.cpp
src/unit/
src/unit/
src/unit/
src/unit/
src/unit/unit.cpp
src/unit/
src/unit/
src/unit/
src/unit/
src/unit/
src/unit/
src/unit/
)
source_group(unit FILES ${unit_SRCS})
set(video_SRCS
src/video/
src/video/
src/video/font.cpp
src/video/
src/video/
src/video/mng.cpp
src/video/
src/video/png.cpp
src/video/sdl.cpp
src/video/
src/video/
)
source_group(video FILES ${video_SRCS})
set(win32_SRCS
src/win32/
src/win32/
)
source_group(win32 FILES ${win32_SRCS})
set(tolua_FILES
src/tolua/ai.pkg
src/tolua/
src/tolua/font.pkg
src/tolua/game.pkg
src/tolua/map.pkg
src/tolua/
src/tolua/
src/tolua/
src/tolua/
src/tolua/
src/tolua/
src/tolua/
src/tolua/
src/tolua/
src/tolua/ui.pkg
src/tolua/unit.pkg
src/tolua/
src/tolua/
src/tolua/
src/tolua/
)
source_group(tolua FILES ${tolua_FILES})
set(stratagus_SRCS
${action_SRCS}
${animation_SRCS}
${ai_SRCS}
${editor_SRCS}
${game_SRCS}
${guichan_SRCS}
${map_SRCS}
${missile_SRCS}
${network_SRCS}
${particle_SRCS}
${pathfinder_SRCS}
${sound_SRCS}
${spell_SRCS}
${stratagusmai
${ui_SRCS}
${unit_SRCS}
${video_SRCS}
${CMAKE_
)
set(stratagus_
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
src/guichan/
)
set(stratagus_
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
)
set(stratagus_
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
)
set(stratagus_
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
)
set(stratagus_
src/ai/ai_local.h
src/video/
src/video/
src/include/
src/include/ai.h
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/font.h
src/include/game.h
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/map.h
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/tile.h
src/include/
src/include/
src/include/
src/include/
src/include/ui.h
src/include/unit.h
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/
src/include/util.h
src/include/
src/include/
src/include/
src/include/
src/include/wav.h
src/include/
)
source_
source_
source_
source_
source_
set (stratagus_HDRS ${stratagus_
# Additional platform checks
if(UNIX AND CMAKE_SYSTEM_NAME MATCHES BSD)
set(BSD true)
endif()
find_package(
# Check if platform is Maemo
if(UNIX AND CMAKE_SYSTEM_NAME MATCHES Linux)
pkg_check_
if(MAEMO_
set(MAEMO true)
endif()
endif()
# Find all libraries
option(
if(ENABLE_STATIC)
set(CMAKE_
endif()
set(CMAKE_
find_package(Lua51 REQUIRED)
find_package(PNG REQUIRED)
find_package(SDL REQUIRED)
##find_
find_package(ZLIB REQUIRED)
if(MAEMO)
pkg_check_
endif()
if(WIN32)
find_package(
endif()
find_package(BZip2)
find_package(
find_package(MNG)
find_package(
find_package(
find_package(X11)
find_package(
find_package(
find_package(
find_package(
find_package(
find_package(
include(
# Windows RC compiler definitions
if(WIN32)
enable_
include(
if(MINGW)
set(CMAKE_
set(CMAKE_
endif()
endif()
# Options for compiling
if(WIN32)
option(
option(ENABLE_NSIS "Create Stratagus Window NSIS Installer" OFF)
endif()
option(
option(WITH_BZIP2 "Compile Stratagus with BZip2 compression support" ON)
option(WITH_MIKMOD "Compile Stratagus with Mikmod sound library" ON)
option(WITH_MNG "Compile Stratagus with MNG image library" ON)
option(
option(WITH_THEORA "Compile Stratagus with Theroa video library" ON)
option(WITH_X11 "Compile Stratagus with X11 clipboard pasting support" ON)
option(ENABLE_DOC "Generate Stratagus source code documentation with Doxygen" OFF)
option(ENABLE_DEV "Install Stratagus game development headers files" OFF)
option(ENABLE_UPX "Compress Stratagus executable binary with UPX packer" OFF)
option(ENABLE_STRIP "Strip all symbols from executables" OFF)
if(NOT WITH_RENDERER)
if(OPENGL_FOUND)
set(WITH_RENDERER "OpenGL")
elseif(
set(WITH_RENDERER "OpenGLES")
else()
set(WITH_RENDERER "NativeSDL")
endif()
endif()
# Install paths
set(BINDIR "bin" CACHE PATH "Where to install user binaries")
set(SBINDIR "sbin" CACHE PATH "Where to install system binaries")
set(GAMEDIR "games" CACHE PATH "Where to install games binaries")
set(DOCDIR "share/
set(MANDIR "share/man/man6" CACHE PATH "Sets the man directory to a non-default location.")
set(PIXMAPSDIR "share/pixmaps" CACHE PATH "Sets the pixmaps directory to a non-default location.")
set(STRATAGUS_
if(NOT IS_ABSOLUTE "${PIXMAPSDIR}")
set(PIXMAPSDIRABS "${CMAKE_
else()
set(PIXMAPSDIRABS "${PIXMAPSDIR}")
endif()
# Stratagus definitions
add_definitions
include_
message(
set(stratagus_LIBS ${stratagus_LIBS} ${LUA_LIBRARIES} ${PNG_LIBRARIES} ${SDL_LIBRARY} "toluapp" "-L /usr/local/lib" ${ZLIB_LIBRARIES})
if(WIN32 AND NOT ENABLE_
add_definition
endif()
if(WITH_BZIP2 AND BZIP2_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${BZIP2_LIBRARIES})
endif()
if(WITH_MIKMOD AND MIKMOD_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${MIKMOD_LIBRARY})
endif()
if(WITH_MNG AND MNG_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${MNG_LIBRARY})
endif()
if(WITH_OGGVORBIS AND OGGVORBIS_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${OGG_LIBRARY} ${VORBIS_LIBRARY})
endif()
if(WITH_THEORA AND THEORA_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${THEORA_LIBRARY})
endif()
if(WITH_X11 AND X11_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${X11_X11_LIB})
endif()
if(WITH_RENDERER STREQUAL "OpenGL" AND OPENGL_FOUND)
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${OPENGL_
elseif(
add_definition
include_
set(stratagus_LIBS ${stratagus_LIBS} ${OPENGLES_
elseif(
message(
else()
message(
endif()
# Platform definitions
if(WIN32)
add_definition
set(stratagus_SRCS ${stratagus_SRCS} ${win32_SRCS})
set(stratagus_LIBS ${stratagus_LIBS} dsound winmm ws2_32)
endif()
if (WIN32 AND MSVC)
add_definition
endif()
if (WIN32 AND MINGW)
set(stratagus_LIBS ${stratagus_LIBS} dxguid)
endif()
if(APPLE)
add_definition
add_definition
endif()
if(BSD)
add_definition
add_definition
endif()
if(BEOS)
add_definition
set(stratagus_SRCS ${stratagus_SRCS} ${beos_SRCS})
endif()
if(MAEMO)
add_definition
include_
set(stratagus_SRCS ${stratagus_SRCS} ${maemo_SRCS})
set(stratagus_LIBS ${stratagus_LIBS} ${LIBOSSO_
# Hack/Bug: On Maemo is not possible to disable touch screen input
set(ENABLE_
endif()
# Stratagus needs to have char by default signed
# No idea how to tell this to other compilers
if(CMAKE_
set(CMAKE_
endif()
check_function_
check_function_
if(HAVE_STRCASESTR)
add_definition
endif()
if(HAVE_STRNLEN)
add_definition
endif()
set(CMAKE_
set(CMAKE_
if(ENABLE_STRIP)
set(CMAKE_
endif()
if(ENABLE_
add_definition
endif()
# Print compile info
message(
macro(log_package PACKAGE_NAME PACKAGE)
if(NOT WITH_${PACKAGE})
message(
elseif(
message(
else()
message(
endif()
endmacro()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Debug mode: Yes (Disable by param -DCMAKE_
else()
message("Debug mode: No (Enable by param -DCMAKE_
endif()
if(ENABLE_STRIP)
message("Strip executables: Yes (Disable by param -DENABLE_
else()
message("Strip executables: No (Enable by param -DENABLE_
endif()
if(ENABLE_STATIC)
message("Static linking: Yes (Disable by param -DENABLE_
else()
message("Static linking: No (Enable by param -DENABLE_
endif()
if(WIN32 AND MSVC)
message("Platform: Windows (MSVC)")
elseif(WIN32 AND MINGW)
message("Platform: Windows (MinGW)")
elseif(WIN32)
message("Platform: Windows (Other)")
elseif(APPLE)
message("Platform: Mac")
elseif(BSD)
message("Platform: BSD")
elseif(BEOS)
message("Platform: BEOS")
elseif(MAEMO)
message("Platform: Maemo")
else()
message("Platform: Other/No platform code")
endif()
if(WIN32 AND ENABLE_
message("Redirect stdio: Yes (Disable by param -DENABLE_
elseif(NOT WIN32)
message("Redirect stdio: Unsupported on this platform")
else()
message("Redirect stdio: No (Enable by param -DENABLE_
endif()
if(ENABLE_
message(
else()
message(
endif()
if(ENABLE_DOC AND DOXYGEN_FOUND)
message("Doxygen documentation: Yes (Disable by param -DENABLE_DOC=OFF)")
else()
message("Doxygen documentation: No (Enable by param -DENABLE_DOC=ON)")
endif()
if(ENABLE_DEV)
message("Game development files: Yes (Disable by param -DENABLE_DEV=OFF)")
else()
message("Game development files: No (Enable by param -DENABLE_DEV=ON)")
endif()
if(ENABLE_UPX AND SELF_PACKER_
message("Upx packer: Yes (Disable by param -DENABLE_UPX=OFF)")
else()
message("Upx packer: No (Enable by param -DENABLE_UPX=ON)")
endif()
if(WIN32 AND ENABLE_NSIS AND MAKENSIS_FOUND)
message("NSIS Installer: Yes (Disable by param -DENABLE_
elseif(NOT WIN32)
message("NSIS Installer: Unsupported on this platform")
else()
message("NSIS Installer: No (Enable by param -DENABLE_NSIS=ON)")
endif()
log_package("Bzip2" "BZIP2")
log_package(
log_package("Mng" "MNG")
log_package(
log_package(
log_package("X11" "X11")
if(WITH_RENDERER STREQUAL "OpenGL" AND OPENGL_FOUND)
message("Renderer: OpenGL")
elseif(
message("Renderer: OpenGL ES 1.1")
else()
message("Renderer: Native SDL")
endif()
message(
# Compile Stratagus
add_custom_
COMMAND "toluapp" ARGS -L stratagus.lua -o ${CMAKE_
DEPENDS ${tolua_FILES}
WORKING_DIRECTORY ${CMAKE_
)
add_executable(
target_
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set_target_
endif()
if(WIN32 AND MINGW AND ENABLE_STATIC)
set_target_
endif()
########### next target ###############
set(metaserver_SRCS
metaserver/cmd.cpp
metaserver/db.cpp
metaserver/
metaserver/
metaserver/
src/network/
)
set(metaserver_HDRS
metaserver/cmd.h
metaserver/db.h
metaserver/games.h
metaserver/
)
source_
if(SQLITE_FOUND)
add_executable
target_
if(WIN32 AND MINGW AND ENABLE_STATIC)
set_target_
endif()
endif()
########### next target ###############
set(png2stratag
tools/
)
source_
add_executable(
target_
if(WIN32 AND MINGW AND ENABLE_STATIC)
set_target_
endif()
########### next target ###############
set(gameheaders
gameheaders/
gameheaders/
gameheaders/
)
source_
########### next target ###############
set(doxygen_FILES
${CMAKE_
doc/Doxyfile-
doc/Doxyfile-
${stratagus_SRCS}
${stratagus_HDRS}
${metaserver_SRCS}
${metaserver_HDRS}
${gameheaders_
${png2stratagu
)
if(ENABLE_DOC AND DOXYGEN_FOUND)
configure_
add_custom_
COMMAND ${DOXYGEN_
DEPENDS ${doxygen_FILES}
WORKING_DIRECTORY ${CMAKE_
COMMENT "Generating Stratagus souce code documentation with Doxygen" VERBATIM
)
add_custom_
set_directory_
endif()
########### next target ###############
macro(self_packer PACKER_TARGET)
get_target_
if(NOT PACKER_NAME)
set(PACKER_NAME ${PACKER_TARGET})
endif()
add_custom_
COMMAND ${SELF_
ARGS ${SELF_
)
endmacro()
if(ENABLE_UPX AND SELF_PACKER_
self_packer(
self_packer(
if(SQLITE_FOUND)
self_
endif()
endif()
########### next target ###############
if(WIN32 AND ENABLE_NSIS AND MAKENSIS_FOUND)
file(COPY ${CMAKE_
file(COPY ${CMAKE_
add_custom_
COMMAND ${MAKENSIS} ARGS ${MAKENSIS_FLAGS} ${CMAKE_
DEPENDS src/win32/
COMMENT "Generating Stratagus Windows NSIS Installer" VERBATIM
)
add_custom_
endif()
########### install files ###############
install(TARGETS stratagus DESTINATION ${GAMEDIR})
install(TARGETS png2stratagus DESTINATION ${BINDIR})
if(SQLITE_FOUND)
install(TARGETS metaserver DESTINATION ${SBINDIR})
endif()
if(ENABLE_DOC AND DOXYGEN_FOUND)
install(FILES doc/stratagus.6 DESTINATION ${MANDIR})
install(FILES
doc/developme
doc/faq.html
doc/gpl.html
doc/guichan-
doc/changelog
doc/index.html
doc/install.html
doc/media.html
doc/metaserve
doc/README-
DESTINATION share/doc/stratagus
)
install(DIRECTORY doc/graphics doc/scripts ${CMAKE_
endif(ENABLE_DOC AND DOXYGEN_FOUND)
if(ENABLE_DEV)
install(FILES ${gameheaders_HDRS} DESTINATION ${STRATAGUS_
endif()
--Cmake file end--
Revision history for this message
|
#6 |
I forgot to mention I did this on OSX Mountain Lion (10.8.2) & the latest Xcode (4.5.2)
Revision history for this message
|
#7 |
CMakeList.txt as diff:
-- 8< --
--- CMakeLists.txt 2012-08-31 16:55:27 +0000
+++ CMakeLists.txt 2012-11-09 23:13:29 +0000
@@ -579,7 +579,7 @@
find_package(Lua51 REQUIRED)
find_package(PNG REQUIRED)
find_package(SDL REQUIRED)
-find_package(
+##find_
find_package(ZLIB REQUIRED)
if(MAEMO)
@@ -669,8 +669,9 @@
# Stratagus definitions
add_definition
-include_
-set(stratagus_LIBS ${stratagus_LIBS} ${LUA_LIBRARIES} ${PNG_LIBRARIES} ${SDL_LIBRARY} ${TOLUA++_LIBRARY} ${ZLIB_LIBRARIES})
+include_
+message(
+set(stratagus_LIBS ${stratagus_LIBS} ${LUA_LIBRARIES} ${PNG_LIBRARIES} ${SDL_LIBRARY} "toluapp" "-L /usr/local/lib" ${ZLIB_LIBRARIES})
if(WIN32 AND NOT ENABLE_
add_definitio
@@ -904,7 +905,7 @@
# Compile Stratagus
add_custom_
- COMMAND ${TOLUA++_APP} ARGS -L stratagus.lua -o ${CMAKE_
+ COMMAND "toluapp" ARGS -L stratagus.lua -o ${CMAKE_
DEPENDS ${tolua_FILES}
WORKING_DIRECTORY ${CMAKE_
)
-- >8 --
So, it seems it is just to get tolua++ which was the problem.
Revision history for this message
|
#8 |
Hello Bradley Clemetson,
Use tolua++ version 1.0.93 from http://
I see that you modified stratagus_LIBS variable. Note that this variable can contains *only* library names. Not some flags (like -L). If you are using some nonstandard directory for libraries, use CMAKE_LIBRARY_PATH (see cmake manpage for more).
Same information is for additional nonstandard include directory. Use for it CMAKE_INCLUDE_PATH.
CMakeLists.txt should not be modified. All configuration options are possible to tell to cmake.
So call cmake with these params:
$ cmake -DCMAKE_
Revision history for this message
|
#9 |
Hi Pali,
The version of Tolua++ on codenix (http://
As far as the custom path names I will use them in the future but I had to hide the Tolua++ requirement as the library is not registered with pkg-config. I am hopeing to get in touch with the people at macports to publish a port of tolua++. That way there will be no need to modify CmakeLists.txt or add any command line arguments.
I probably should more clear to mention this is a very temporary solution(hack) for those that wish to use it immeadiatly, otherwise wait for myself or someone else to make tolua++ register with pkg-config or a macports port.
Revision history for this message
|
#10 |
We do not use pkg-config for finding tolua. It is clean cmake module in stratagus/
https:/
You can try to add cmake cmdline param -DTOLUA+
Revision history for this message
|
#11 |
I modified the FindTolua++.cmake slightly, now it is in Part 3 "D" should be skipped
Revision history for this message
|
#12 |
Thanks to Bradley, I was able to build a binary for OS X!
I even went one step further and made a statically linked binary and constructed a Mac App Bundle out of the whole Stratagus/Wargus package. Looks and acts just like a native OS X app (cool!).
Next I'd like to take a stab at fixing up the Wargus lua scripts...
Can you help with this problem?
Provide an answer of your own, or ask Julio for more information if necessary.