Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
2cd5addc
Commit
2cd5addc
authored
12 years ago
by
Perttu Ahola
Browse files
Options
Downloads
Patches
Plain Diff
Fix things for cross-compiling using mingw
parent
5bf06efb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+7
-1
7 additions, 1 deletion
CMakeLists.txt
misc/winresource.rc
+5
-0
5 additions, 0 deletions
misc/winresource.rc
src/CMakeLists.txt
+17
-8
17 additions, 8 deletions
src/CMakeLists.txt
with
29 additions
and
9 deletions
CMakeLists.txt
+
7
−
1
View file @
2cd5addc
...
...
@@ -7,10 +7,16 @@ endif(${CMAKE_VERSION} STREQUAL "2.8.2")
# This can be read from ${PROJECT_NAME} after project() is called
project
(
minetest
)
set
(
VERSION_EXTRA
""
CACHE STRING
"Stuff to append to version string"
)
# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
set
(
VERSION_MAJOR 0
)
set
(
VERSION_MINOR 4
)
set
(
VERSION_PATCH dev-20120326
)
if
(
VERSION_EXTRA
)
set
(
VERSION_PATCH dev-20120326-
${
VERSION_EXTRA
}
)
else
()
set
(
VERSION_PATCH dev-20120326
)
endif
()
set
(
VERSION_STRING
"
${
VERSION_MAJOR
}
.
${
VERSION_MINOR
}
.
${
VERSION_PATCH
}
"
)
MESSAGE
(
STATUS
"*** Will build version
${
VERSION_STRING
}
***"
)
...
...
This diff is collapsed.
Click to expand it.
s
r
c/winresource.rc
→
mi
sc/winresource.rc
+
5
−
0
View file @
2cd5addc
...
...
@@ -2,5 +2,4 @@
#include <commctrl.h>
#include <richedit.h>
LANGUAGE 0, SUBLANG_NEUTRAL
130 ICON "..\\misc\\minetest-icon.ico"
//131 BITMAP "..\\misc\\minetest-icon.bmp"
130 ICON "minetest-icon.ico"
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
17
−
8
View file @
2cd5addc
...
...
@@ -67,7 +67,7 @@ endif(ENABLE_SOUND AND BUILD_CLIENT)
if
(
SOUND_PROBLEM
)
message
(
FATAL_ERROR
"Sound enabled, but cannot be used.
\n
"
"To continue, either fill in the required paths or disable sound."
)
"To continue, either fill in the required paths or disable sound.
(-DENABLE_SOUND=0)
"
)
endif
()
if
(
USE_SOUND
)
set
(
sound_SRCS sound_openal.cpp
)
...
...
@@ -205,14 +205,19 @@ set(common_SRCS
# This gives us the icon
if
(
WIN32
)
set
(
WINRESOURCE_FILE
${
CMAKE_CURRENT_SOURCE_DIR
}
/../misc/winresource.rc
)
if
(
MINGW
)
if
(
NOT CMAKE_RC_COMPILER
)
set
(
CMAKE_RC_COMPILER
"windres.exe"
)
endif
()
ADD_CUSTOM_COMMAND
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/winresource_rc.o
COMMAND windres.exe -I
${
CMAKE_CURRENT_SOURCE_DIR
}
-i
${
CMAKE_CURRENT_SOURCE_DIR
}
/winresource.rc
-o
${
CMAKE_CURRENT_BINARY_DIR
}
/winresource_rc.o
)
COMMAND
${
CMAKE_RC_COMPILER
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
-i
${
WINRESOURCE_FILE
}
-o
${
CMAKE_CURRENT_BINARY_DIR
}
/winresource_rc.o
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
SET
(
common_SRCS
${
common_SRCS
}
${
CMAKE_CURRENT_BINARY_DIR
}
/winresource_rc.o
)
else
(
MINGW
)
# Probably MSVC
set
(
common_SRCS
${
common_SRCS
}
winresource.rc
)
set
(
common_SRCS
${
common_SRCS
}
${
WINRESOURCE_FILE
}
)
endif
(
MINGW
)
endif
()
...
...
@@ -348,14 +353,18 @@ else()
set
(
WARNING_FLAGS
"
${
WARNING_FLAGS
}
-Wno-unused-but-set-variable"
)
endif
(
HAS_UNUSED_BUT_SET_VARIABLE_WARNING
)
endif
()
if
(
MINGW
)
set
(
OTHER_FLAGS
"-mthreads -fexceptions"
)
endif
()
if
(
APPLE
)
set
(
CMAKE_OSX_ARCHITECTURES i386 CACHE STRING
"do not build for 64-bit"
FORCE
)
set
(
ARCH i386
)
endif
()
set
(
CMAKE_CXX_FLAGS_RELEASE
"-DNDEBUG
${
RELEASE_WARNING_FLAGS
}
${
WARNING_FLAGS
}
-O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -O1 -Wall
${
WARNING_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-DNDEBUG
${
RELEASE_WARNING_FLAGS
}
${
WARNING_FLAGS
}
${
OTHER_FLAGS
}
-O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g -O1 -Wall
${
WARNING_FLAGS
}
${
OTHER_FLAGS
}
"
)
if
(
USE_GPROF
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-pg"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment