summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2015-10-13 12:50:42 (GMT)
committerTony Theodore <tonyt@logyst.com>2015-10-25 01:23:28 (GMT)
commit870e439d0f5e02b0d83930b1fb7261ec8c6a9a3b (patch)
tree533fbe354b2b199f300ef605a602d1f7ffd90a92 /src
parent3185b292b0b04bbd14fa9ea8a4a887a820edeec5 (diff)
downloadmxe-870e439d0f5e02b0d83930b1fb7261ec8c6a9a3b.zip
mxe-870e439d0f5e02b0d83930b1fb7261ec8c6a9a3b.tar.gz
mxe-870e439d0f5e02b0d83930b1fb7261ec8c6a9a3b.tar.bz2
mxe-conf: consolidate rules and install cmake modules under usr
Diffstat (limited to 'src')
-rw-r--r--src/mxe-conf.mk26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/mxe-conf.mk b/src/mxe-conf.mk
index 5d814de..b1afedf 100644
--- a/src/mxe-conf.mk
+++ b/src/mxe-conf.mk
@@ -4,17 +4,14 @@
PKG := mxe-conf
$(PKG)_VERSION := 1
$(PKG)_UPDATE := echo 1
+$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
-define $(PKG)_BUILD_COMMON
+define $(PKG)_BUILD
# install target-specific autotools config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/share'
# setting ac_cv_build bypasses the config.guess check in every package
echo "ac_cv_build=$(BUILD)" > '$(PREFIX)/$(TARGET)/share/config.site'
- # install config.guess for general use
- $(INSTALL) -d '$(PREFIX)/bin'
- $(INSTALL) -m755 '$(EXT_DIR)/config.guess' '$(PREFIX)/bin/'
-
# create the CMake toolchain file
# individual packages (e.g. hdf5) should add their
# own files under CMAKE_TOOLCHAIN_DIR
@@ -31,7 +28,7 @@ define $(PKG)_BUILD_COMMON
echo 'set(CMAKE_CXX_COMPILER $(PREFIX)/bin/$(TARGET)-g++)'; \
echo 'set(CMAKE_Fortran_COMPILER $(PREFIX)/bin/$(TARGET)-gfortran)'; \
echo 'set(CMAKE_RC_COMPILER $(PREFIX)/bin/$(TARGET)-windres)'; \
- echo 'set(CMAKE_MODULE_PATH "$(PWD)/src/cmake/modules" $${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts'; \
+ echo 'set(CMAKE_MODULE_PATH "$(PREFIX)/share/cmake/modules" $${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts'; \
echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \
echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")'; \
echo 'set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075'; \
@@ -66,10 +63,6 @@ define $(PKG)_BUILD_COMMON
#create readonly directory to force wine to fail
$(INSTALL) -m444 -d "$$WINEPREFIX"
-endef
-
-define $(PKG)_BUILD
- $($(PKG)_BUILD_COMMON)
# create pkg-config files for OpenGL/GLU
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
@@ -85,6 +78,17 @@ define $(PKG)_BUILD
echo 'Libs: -lglu32';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/glu.pc'
+endef
+
+define $(PKG)_BUILD_$(BUILD)
+ # install config.guess for general use
+ $(INSTALL) -d '$(PREFIX)/bin'
+ $(INSTALL) -m755 '$(EXT_DIR)/config.guess' '$(PREFIX)/bin/'
+
+ # install cmake modules
+ $(INSTALL) -d '$(PREFIX)/share/cmake/modules'
+ $(INSTALL) -m644 '$(PWD)/src/cmake/modules/'* '$(PREFIX)/share/cmake/modules'
+
# fail early if autotools can't autoreconf
# 1. detect mismatches in installation locations
# 2. ???
@@ -97,5 +101,3 @@ define $(PKG)_BUILD
cd '$(1)' && autoreconf -fiv
cd '$(1)' && ./configure
endef
-
-$(PKG)_BUILD_$(BUILD) = $($(PKG)_BUILD_COMMON)