target 0.44 for now
parent
fece1877bf
commit
3db2c314b5
@ -1,163 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 3c2047dd5..d209037c0 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -219,7 +219,7 @@ if(OSG_STATIC)
|
|
||||||
add_definitions(-DOSG_LIBRARY_STATIC)
|
|
||||||
|
|
||||||
find_package(OSGPlugins REQUIRED COMPONENTS ${USED_OSG_PLUGINS})
|
|
||||||
- list(APPEND OPENSCENEGRAPH_LIBRARIES ${OSGPlugins_LIBRARIES})
|
|
||||||
+ list(APPEND OPENSCENEGRAPH_LIBRARIES "-Wl,-Bstatic" ${OSGPlugins_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(QT_STATIC)
|
|
||||||
@@ -470,7 +470,7 @@ if(WIN32)
|
|
||||||
|
|
||||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Debug/resources" DESTINATION "." CONFIGURATIONS Debug)
|
|
||||||
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Release/resources" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel)
|
|
||||||
-
|
|
||||||
+
|
|
||||||
FILE(GLOB plugin_dir_debug "${OpenMW_BINARY_DIR}/Debug/osgPlugins-*")
|
|
||||||
FILE(GLOB plugin_dir_release "${OpenMW_BINARY_DIR}/Release/osgPlugins-*")
|
|
||||||
INSTALL(DIRECTORY ${plugin_dir_debug} DESTINATION "." CONFIGURATIONS Debug)
|
|
||||||
@@ -837,4 +837,3 @@ if (DOXYGEN_FOUND)
|
|
||||||
WORKING_DIRECTORY ${OpenMW_BINARY_DIR}
|
|
||||||
COMMENT "Generating documentation for the github-pages at ${DOXYGEN_PAGES_OUTPUT_DIR}" VERBATIM)
|
|
||||||
endif ()
|
|
||||||
-
|
|
||||||
diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt
|
|
||||||
index 0092712db..fc29e0c0b 100644
|
|
||||||
--- a/apps/openmw/CMakeLists.txt
|
|
||||||
+++ b/apps/openmw/CMakeLists.txt
|
|
||||||
@@ -97,6 +97,8 @@ add_openmw_dir (mwbase
|
|
||||||
|
|
||||||
# Main executable
|
|
||||||
|
|
||||||
+link_libraries("-static")
|
|
||||||
+
|
|
||||||
if (NOT ANDROID)
|
|
||||||
openmw_add_executable(openmw
|
|
||||||
${OPENMW_FILES}
|
|
||||||
@@ -111,6 +113,13 @@ else ()
|
|
||||||
)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
+add_custom_command(
|
|
||||||
+ TARGET openmw
|
|
||||||
+ PRE_LINK
|
|
||||||
+ COMMAND sed 's:-Wl,-Bdynamic::g' -i /home/eater/projects/openmw-mingw/mxe/tmp-openmw-x86_64-w64-mingw32.static/openmw-openmw-0.45.0.build_/apps/openmw/CMakeFiles/openmw.dir/linklibs.rsp
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
|
||||||
# when we change the backend.
|
|
||||||
include_directories(
|
|
||||||
@@ -118,6 +127,8 @@ include_directories(
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(openmw
|
|
||||||
+ "-Wl,-Bstatic"
|
|
||||||
+ ${OPENMW_CUSTOM_FLAGS}
|
|
||||||
${OSG_LIBRARIES}
|
|
||||||
${OPENTHREADS_LIBRARIES}
|
|
||||||
${OSGPARTICLE_LIBRARIES}
|
|
||||||
@@ -138,7 +149,7 @@ target_link_libraries(openmw
|
|
||||||
components
|
|
||||||
)
|
|
||||||
|
|
||||||
-if (ANDROID)
|
|
||||||
+# if (ANDROID)
|
|
||||||
set (OSG_PLUGINS
|
|
||||||
-Wl,--whole-archive
|
|
||||||
)
|
|
||||||
@@ -151,24 +162,24 @@ if (ANDROID)
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(openmw
|
|
||||||
- EGL
|
|
||||||
- android
|
|
||||||
+# EGL
|
|
||||||
+# android
|
|
||||||
log
|
|
||||||
dl
|
|
||||||
z
|
|
||||||
${OPENSCENEGRAPH_LIBRARIES}
|
|
||||||
freetype
|
|
||||||
jpeg
|
|
||||||
- png
|
|
||||||
+ png
|
|
||||||
)
|
|
||||||
-endif (ANDROID)
|
|
||||||
+# endif (ANDROID)
|
|
||||||
|
|
||||||
if (USE_SYSTEM_TINYXML)
|
|
||||||
target_link_libraries(openmw ${TinyXML_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT UNIX)
|
|
||||||
-target_link_libraries(openmw ${SDL2MAIN_LIBRARY})
|
|
||||||
+target_link_libraries(openmw "-Wl,-Bstatic" ${SDL2MAIN_LIBRARY})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
|
||||||
diff --git a/cmake/FindMyGUI.cmake b/cmake/FindMyGUI.cmake
|
|
||||||
index 473f543ba..2dc820922 100644
|
|
||||||
--- a/cmake/FindMyGUI.cmake
|
|
||||||
+++ b/cmake/FindMyGUI.cmake
|
|
||||||
@@ -37,7 +37,7 @@ libfind_pkg_detect(MyGUI MyGUI${MYGUI_STATIC_SUFFIX} MYGUI${MYGUI_STATIC_SUFFIX}
|
|
||||||
HINTS $ENV{MYGUI_HOME}/lib
|
|
||||||
PATH_SUFFIXES "" release relwithdebinfo minsizerel
|
|
||||||
)
|
|
||||||
-if (MYGUI_STATIC AND (APPLE OR ANDROID))
|
|
||||||
+if (MYGUI_STATIC)
|
|
||||||
# we need explicit Freetype libs only on OS X and ANDROID for static build
|
|
||||||
libfind_package(MyGUI Freetype)
|
|
||||||
endif()
|
|
||||||
@@ -48,6 +48,8 @@ libfind_version_n_header(MyGUI
|
|
||||||
)
|
|
||||||
libfind_process(MyGUI)
|
|
||||||
|
|
||||||
+set(MyGUI_LIBRARIES "-Wl,-Bstatic" ${MyGUI_LIBRARIES})
|
|
||||||
+
|
|
||||||
if (MyGUI_Debug_FOUND)
|
|
||||||
set(MyGUI_LIBRARIES optimized ${MyGUI_LIBRARIES} debug ${MyGUI_Debug_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
diff --git a/cmake/FindOSGPlugins.cmake b/cmake/FindOSGPlugins.cmake
|
|
||||||
index 2654bf5d5..e0c3af930 100644
|
|
||||||
--- a/cmake/FindOSGPlugins.cmake
|
|
||||||
+++ b/cmake/FindOSGPlugins.cmake
|
|
||||||
@@ -45,4 +45,5 @@ foreach(_dependency PNG ZLIB JPEG) # needed by osgdb_png or osgdb_jpeg
|
|
||||||
#list(APPEND OSGPlugins_PROCESS_LIBS ${_dependency}_LIBRARY)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
+libfind_package(OSGPlugin openexr)
|
|
||||||
libfind_process(OSGPlugins)
|
|
||||||
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
|
|
||||||
index 5c245afd0..d282fa6ba 100644
|
|
||||||
--- a/components/CMakeLists.txt
|
|
||||||
+++ b/components/CMakeLists.txt
|
|
||||||
@@ -197,6 +197,7 @@ include_directories(${Bullet_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
|
|
||||||
|
|
||||||
target_link_libraries(components
|
|
||||||
+ "-Wl,-Bstatic"
|
|
||||||
${Boost_SYSTEM_LIBRARY}
|
|
||||||
${Boost_FILESYSTEM_LIBRARY}
|
|
||||||
${Boost_THREAD_LIBRARY}
|
|
||||||
@@ -218,6 +219,7 @@ target_link_libraries(components
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
target_link_libraries(components
|
|
||||||
+ "-Wl,-Bstatic"
|
|
||||||
${Boost_LOCALE_LIBRARY})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
@@ -236,7 +238,7 @@ if (GIT_CHECKOUT)
|
|
||||||
endif (GIT_CHECKOUT)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
- target_link_libraries(components shlwapi)
|
|
||||||
+ target_link_libraries(components "-Wl,-Bstatic" shlwapi)
|
|
||||||
if(MINGW)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOGDI")
|
|
||||||
endif(MINGW)
|
|
@ -0,0 +1,46 @@
|
|||||||
|
diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt
|
||||||
|
index e64998077..af5335057 100644
|
||||||
|
--- a/apps/openmw/CMakeLists.txt
|
||||||
|
+++ b/apps/openmw/CMakeLists.txt
|
||||||
|
@@ -120,6 +120,7 @@ include_directories(
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(openmw
|
||||||
|
+ ${OPENMW_CXX_FLAGS}
|
||||||
|
${OSG_LIBRARIES}
|
||||||
|
${OPENTHREADS_LIBRARIES}
|
||||||
|
${OSGPARTICLE_LIBRARIES}
|
||||||
|
@@ -140,7 +141,7 @@ target_link_libraries(openmw
|
||||||
|
components
|
||||||
|
)
|
||||||
|
|
||||||
|
-if (ANDROID)
|
||||||
|
+if (ANDROID OR OPENMW_STATIC)
|
||||||
|
set (OSG_PLUGINS
|
||||||
|
-Wl,--whole-archive
|
||||||
|
)
|
||||||
|
@@ -153,15 +154,20 @@ if (ANDROID)
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(openmw
|
||||||
|
- EGL
|
||||||
|
- android
|
||||||
|
- log
|
||||||
|
dl
|
||||||
|
z
|
||||||
|
${OPENSCENEGRAPH_LIBRARIES}
|
||||||
|
freetype
|
||||||
|
jpeg
|
||||||
|
- png
|
||||||
|
+ png
|
||||||
|
+ )
|
||||||
|
+endif (ANDROID OR OPENMW_STATIC)
|
||||||
|
+
|
||||||
|
+if (ANDROID)
|
||||||
|
+ target_link_libraries(openmw
|
||||||
|
+ EGL
|
||||||
|
+ android
|
||||||
|
+ log
|
||||||
|
)
|
||||||
|
endif (ANDROID)
|
||||||
|
|
@ -1,39 +1,37 @@
|
|||||||
PKG := openmw
|
PKG := openmw
|
||||||
$(PKG)_DESCR := Fast, flexible and simple GUI.
|
$(PKG)_DESCR := Fast, flexible and simple GUI.
|
||||||
$(PKG)_IGNORE :=
|
$(PKG)_IGNORE :=
|
||||||
$(PKG)_VERSION := 0.45.0
|
$(PKG)_VERSION := 0.44.0
|
||||||
$(PKG)_SUBDIR := openmw-openmw-$($(PKG)_VERSION)
|
$(PKG)_SUBDIR := openmw-openmw-$($(PKG)_VERSION)
|
||||||
$(PKG)_CHECKSUM := b63cf971f406ef5f28019f65e9e2bd9641a227459ede45d147562917f67e1c64
|
$(PKG)_CHECKSUM := 9e7db99dd3e1434b2e32e9e61ae5a8fb516a69bb6880fb2856c09f2c9ca8cf0d
|
||||||
$(PKG)_GH_CONF := openmw/openmw/releases
|
$(PKG)_GH_CONF := openmw/openmw/releases
|
||||||
$(PKG)_URL_2 := https://github.com/openmw/openmw/archive/openmw-$($(PKG)_VERSION).tar.gz
|
$(PKG)_URL_2 := https://github.com/openmw/openmw/archive/openmw-$($(PKG)_VERSION).tar.gz
|
||||||
$(PKG)_DEPS := cc bullet qt openscenegraph boost ffmpeg openal sdl2 mygui
|
$(PKG)_DEPS := cc bullet qt openscenegraph boost ffmpeg openal sdl2 mygui
|
||||||
$(PKG)_BINARY_LOCATION := $(PREFIX)/$(TARGET)/opt/openmw
|
|
||||||
|
|
||||||
define $(PKG)_BUILD
|
define $(PKG)_BUILD
|
||||||
|
|
||||||
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
|
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
|
||||||
-DMyGUI_LIBRARY=$(PREFIX)/$(TARGET)/lib/Release/libMyGUIEngineStatic.a \
|
-DMyGUI_LIBRARY=$(PREFIX)/$(TARGET)/lib/Release/libMyGUIEngineStatic.a \
|
||||||
-DMYGUI_STATIC=ON \
|
-DMYGUI_STATIC=ON \
|
||||||
-DBOOST_STATIC=ON \
|
-DBOOST_STATIC=ON \
|
||||||
-DSDL2_STATIC=ON \
|
-DSDL2_STATIC=ON \
|
||||||
-DOSG_STATIC=ON \
|
-DOSG_STATIC=ON \
|
||||||
-DQT_STATIC=ON \
|
-DOSG_PLUGINS_DIR=$(PREFIX)/$(TARGET)/lib/osgPlugins-${openscenegraph_VERSION}.0 \
|
||||||
-DRECASTNAVIGATION_STATIC=ON \
|
-DQT_STATIC=ON \
|
||||||
-DBUILD_OPENCS=OFF \
|
-DRECASTNAVIGATION_STATIC=ON \
|
||||||
-DBUILD_NIFTEST=OFF \
|
-DBUILD_OPENCS=OFF \
|
||||||
-DBUILD_LAUNCHER=OFF \
|
-DBUILD_NIFTEST=OFF \
|
||||||
-DBUILD_WIZARD=OFF \
|
-DBUILD_LAUNCHER=OFF \
|
||||||
-DBUILD_MWINIIMPORTER=OFF \
|
-DBUILD_WIZARD=OFF \
|
||||||
-DBUILD_ESSIMPORTER=OFF \
|
-DBUILD_MWINIIMPORTER=OFF \
|
||||||
-DBUILD_BSATOOL=OFF \
|
-DBUILD_ESSIMPORTER=OFF \
|
||||||
-DBUILD_ESMTOOL=OFF \
|
-DBUILD_BSATOOL=OFF \
|
||||||
-DBoost_ALL_NO_LIB=ON \
|
-DBUILD_ESMTOOL=OFF \
|
||||||
-DCMAKE_BUILD_TYPE=None \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DCMAKE_CXX_FLAGS="-static -Wa,-mbig-obj -Wl,-Bstatic -DAL_LIBTYPE_STATIC" \
|
||||||
-DCMAKE_CXX_FLAGS="-static -Wa,-mbig-obj -Wl,-Bstatic -DAL_LIBTYPE_STATIC" \
|
-DOPENMW_STATIC=ON \
|
||||||
-DOPENMW_CUSTOM_FLAGS="-Wl,-Bstatic $(PREFIX)/$(TARGET)/lib/libOpenAL32.a `$(TARGET)-pkg-config --cflags --libs openal freetype2 sdl2 gl libavcodec libavdevice libavfilter libavformat libavresample libavutil`"
|
-DOPENMW_CXX_FLAGS="-Wl,-Bstatic `$(TARGET)-pkg-config --static --cflags --libs libjpeg openal freetype2 sdl2 gl libavcodec libavdevice libavfilter libavformat libavresample libavutil`"
|
||||||
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
|
||||||
$(TARGET)-strip '$(BUILD_DIR)/openmw.exe'
|
$(TARGET)-strip '$(BUILD_DIR)/openmw.exe'
|
||||||
mkdir -p '$($(PKG)_BINARY_LOCATION)'
|
mkdir -p '$(PREFIX)/$(TARGET)/opt/openmw'
|
||||||
cp '$(BUILD_DIR)/openmw.exe' '$($(PKG)_BINARY_LOCATION)'
|
cp '$(BUILD_DIR)/openmw.exe' '$(PREFIX)/$(TARGET)/opt/openmw'
|
||||||
endef
|
endef
|
||||||
|
Loading…
Reference in New Issue