-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start to modularize platform specific build logic
- Loading branch information
Showing
26 changed files
with
128 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -361,12 +361,6 @@ ENDIF(LMMS_BUILD_WIN32) | |
# check for libsamplerate | ||
PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8) | ||
|
||
|
||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/lmmsconfig.h.in" "${CMAKE_BINARY_DIR}/lmmsconfig.h") | ||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/lmmsversion.h.in" "${CMAKE_BINARY_DIR}/lmmsversion.h") | ||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/data/lmms.rc.in" "${CMAKE_BINARY_DIR}/lmms.rc") | ||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc") | ||
|
||
# set compiler flags | ||
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow") | ||
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF) | ||
|
@@ -424,26 +418,14 @@ ENDIF(WIN32 OR WIN64) | |
# we somehow have to make LMMS-binary depend on MOC-files | ||
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h") | ||
|
||
# set up apple vars before traversing into data/scripts | ||
SET(MACOSX_BUNDLE_ICON_FILE "lmms.icns") | ||
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "LMMS") | ||
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}") | ||
SET(MACOSX_BUNDLE_BUNDLE_NAME "LMMS") | ||
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}") | ||
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}") | ||
SET(MACOSX_BUNDLE_COPYRIGHT "Tobias Doerffel, 2008-2010") | ||
SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project") | ||
SET(MACOSX_BUNDLE_MIMETYPE_ICON "project.icns") | ||
SET(MACOSX_BUNDLE_MIMETYPE_ID "net.sourceforge.lmms") | ||
SET(MACOSX_BUNDLE_PROJECT_URL "http://lmms.io") | ||
|
||
IF(WIN32) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") | ||
ELSE(WIN32) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC") | ||
ENDIF(WIN32) | ||
|
||
# make sub-directories | ||
ADD_SUBDIRECTORY(cmake) | ||
ADD_SUBDIRECTORY(src) | ||
ADD_SUBDIRECTORY(plugins) | ||
ADD_SUBDIRECTORY(tests) | ||
|
@@ -494,7 +476,7 @@ ADD_CUSTOM_TARGET(dist | |
COMMAND make clean | ||
COMMAND rm -rf "${TMP}" | ||
COMMAND mkdir -p "${TMP}" | ||
COMMAND cp CMakeLists.txt LICENSE.txt INSTALL README.md "${TMP}" | ||
COMMAND cp CMakeLists.txt LICENSE.txt INSTALL.txt README.md "${TMP}" | ||
COMMAND cp -r buildtools cmake data doc include plugins src "${TMP}" | ||
COMMAND rm -rf `find "${TMP}" -name cmake_install.cmake` `find "${TMP}" -name Makefile` `find "${TMP}" -type d -name CMakeFiles` "${TMP}/CMakeCache.txt" | ||
COMMAND tar cjf lmms-${VERSION}-src.tar.bz2 "${TMP}" | ||
|
@@ -562,51 +544,4 @@ MESSAGE( | |
"\n\n") | ||
|
||
INCLUDE(InstallRequiredSystemLibraries) | ||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LMMS - easy music production for everyone!") | ||
SET(CPACK_PACKAGE_VENDOR "LMMS Developers") | ||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") | ||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt") | ||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") | ||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}") | ||
IF(VERSION_SUFFIX) | ||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}-${VERSION_SUFFIX}") | ||
ENDIF(VERSION_SUFFIX) | ||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LMMS") | ||
IF(WIN32) | ||
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data/nsis_branding.bmp") | ||
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/data/lmms.ico") | ||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "lmms.exe") | ||
SET(CPACK_NSIS_DISPLAY_NAME "LMMS ${VERSION}") | ||
SET(CPACK_NSIS_HELP_LINK "http://lmms.io") | ||
SET(CPACK_NSIS_URL_INFO_ABOUT "http://lmms.io") | ||
SET(CPACK_NSIS_CONTACT "[email protected]") | ||
SET(CPACK_PACKAGE_EXECUTABLES "lmms.exe;LMMS") | ||
SET(CPACK_NSIS_MENU_LINKS "lmms.exe;LMMS") | ||
SET(CPACK_NSIS_DEFINES "!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh") | ||
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win32") | ||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " | ||
\\\${registerExtension} \\\"$INSTDIR\\\\lmms.exe\\\" \\\".mmp\\\" \\\"LMMS Project\\\" | ||
\\\${registerExtension} \\\"$INSTDIR\\\\lmms.exe\\\" \\\".mmpz\\\" \\\"LMMS Project (compressed)\\\" | ||
") | ||
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " | ||
\\\${unregisterExtension} \\\".mmp\\\" \\\"LMMS Project\\\" | ||
\\\${unregisterExtension} \\\".mmpz\\\" \\\"LMMS Project (compressed)\\\" | ||
DeleteRegKey HKCR \\\"LMMS Project\\\" | ||
DeleteRegKey HKCR \\\"LMMS Project (compressed)\\\" | ||
") | ||
ELSE(WIN32) | ||
SET(CPACK_STRIP_FILES "bin/lmms;${PLUGIN_DIR}/*.so") | ||
SET(CPACK_PACKAGE_EXECUTABLES "lmms" "LMMS binary") | ||
ENDIF(WIN32) | ||
|
||
IF(WIN64) | ||
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win64") | ||
SET(CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES} | ||
InstallDir \\\"\\\$PROGRAMFILES64\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\"") | ||
ENDIF(WIN64) | ||
|
||
SET(CPACK_SOURCE_GENERATOR "TBZ2") | ||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lmms-${VERSION}") | ||
INCLUDE(CPack) | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LMMS - easy music production for everyone!") | ||
SET(CPACK_PACKAGE_VENDOR "LMMS Developers") | ||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") | ||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt") | ||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") | ||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}") | ||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LMMS") | ||
SET(CPACK_SOURCE_GENERATOR "TBZ2") | ||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lmms-${VERSION}") | ||
IF(VERSION_SUFFIX) | ||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}-${VERSION_SUFFIX}") | ||
ENDIF() | ||
IF(NOT DEFINED WIN32) | ||
SET(CPACK_STRIP_FILES "bin/lmms;${PLUGIN_DIR}/*.so") | ||
SET(CPACK_PACKAGE_EXECUTABLES "lmms" "LMMS binary") | ||
ENDIF() | ||
INCLUDE(CPack) | ||
|
||
IF(LMMS_BUILD_WIN32) | ||
ADD_SUBDIRECTORY(nsis) | ||
ELSEIF(LMMS_BUILD_APPLE) | ||
ADD_SUBDIRECTORY(apple) | ||
ELSE() | ||
ADD_SUBDIRECTORY(linux) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
STRING(TIMESTAMP LMMS_YEAR "%Y") | ||
|
||
SET(MACOSX_BUNDLE_ICON_FILE "lmms.icns") | ||
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "LMMS") | ||
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}") | ||
SET(MACOSX_BUNDLE_BUNDLE_NAME "LMMS") | ||
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}") | ||
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}") | ||
SET(MACOSX_BUNDLE_COPYRIGHT "LMMS Developers, 2008-${LMMS_YEAR}") | ||
SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project") | ||
SET(MACOSX_BUNDLE_MIMETYPE_ICON "project.icns") | ||
SET(MACOSX_BUNDLE_MIMETYPE_ID "io.lmms") | ||
SET(MACOSX_BUNDLE_PROJECT_URL "http://lmms.io") | ||
|
||
CONFIGURE_FILE("lmms.plist.in" "${CMAKE_BINARY_DIR}/Info.plist") | ||
CONFIGURE_FILE("install_apple.sh.in" "${CMAKE_BINARY_DIR}/install_apple.sh" @ONLY) | ||
CONFIGURE_FILE("package_apple.sh.in" "${CMAKE_BINARY_DIR}/package_apple_dmg.sh" @ONLY) | ||
|
||
# Add execute permissions to install script | ||
EXECUTE_PROCESS(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/install_apple.sh) | ||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_BINARY_DIR}/install_apple.sh)") | ||
|
||
# TODO: Add PACKAGE target using package_apple_dmg.sh | ||
|
||
|
||
|
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSTALL(FILES lmms.png DESTINATION "${DATA_DIR}/pixmaps") | ||
INSTALL(FILES lmms DESTINATION "${DATA_DIR}/menu") | ||
INSTALL(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications") | ||
INSTALL(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages") |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/nsis_branding.bmp") | ||
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lmms.ico") | ||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "lmms.exe") | ||
SET(CPACK_NSIS_DISPLAY_NAME "LMMS ${VERSION}") | ||
SET(CPACK_NSIS_HELP_LINK "http://lmms.io") | ||
SET(CPACK_NSIS_URL_INFO_ABOUT "http://lmms.io") | ||
SET(CPACK_NSIS_CONTACT "[email protected]") | ||
SET(CPACK_PACKAGE_EXECUTABLES "lmms.exe;LMMS") | ||
SET(CPACK_NSIS_MENU_LINKS "lmms.exe;LMMS") | ||
SET(CPACK_NSIS_DEFINES "!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh") | ||
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win32") | ||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " | ||
\\\${registerExtension} \\\"$INSTDIR\\\\lmms.exe\\\" \\\".mmp\\\" \\\"LMMS Project\\\" | ||
\\\${registerExtension} \\\"$INSTDIR\\\\lmms.exe\\\" \\\".mmpz\\\" \\\"LMMS Project (compressed)\\\" | ||
") | ||
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " | ||
\\\${unregisterExtension} \\\".mmp\\\" \\\"LMMS Project\\\" | ||
\\\${unregisterExtension} \\\".mmpz\\\" \\\"LMMS Project (compressed)\\\" | ||
DeleteRegKey HKCR \\\"LMMS Project\\\" | ||
DeleteRegKey HKCR \\\"LMMS Project (compressed)\\\" | ||
") | ||
|
||
IF(WIN64) | ||
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win64") | ||
SET(CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES} | ||
InstallDir \\\"\\\$PROGRAMFILES64\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\"") | ||
ENDIF() | ||
|
||
# Windows resource compilers | ||
CONFIGURE_FILE("lmms.rc.in" "${CMAKE_BINARY_DIR}/lmms.rc") | ||
CONFIGURE_FILE("zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc") | ||
|
||
FILE(GLOB RAWWAVES "${CMAKE_INSTALL_PREFIX}/share/stk/rawwaves/*.raw") | ||
INSTALL(FILES ${RAWWAVES} DESTINATION "${DATA_DIR}/stk/rawwaves") | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
lmmsicon ICON data/lmms.ico | ||
lmmsicon ICON cmake/nsis/lmms.ico | ||
#include <windows.h> | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
zynaddsubfx_icon ICON zynaddsubfx/zynaddsubfx.ico | ||
#include <windows.h> | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION 0,2,3,0 | ||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | ||
FILEOS VOS_NT_WINDOWS32 | ||
FILETYPE VFT_APP | ||
FILESUBTYPE VFT2_UNKNOWN | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904E4" | ||
//language ID = U.S. English, charset = Windows, Multilingual | ||
BEGIN | ||
VALUE "Comments", "ZynAddSubFX Plugin - LMMS (http://lmms.sf.net)\0" | ||
VALUE "CompanyName", "LMMS Developers\0" | ||
VALUE "FileDescription", "ZynAddSubFX LMMS Plugin\0" | ||
VALUE "FileVersion", "2.3.0/@VERSION@\0" | ||
VALUE "LegalCopyright", "Copyright (c) Nasca Octavian Paul, Mark McCurry, Harald Hvaal, Tobias Doerffel\0" | ||
VALUE "OriginalFilename", "RemoteZynAddSubFx.exe\0" | ||
VALUE "ProductName", "ZynAddSubFX/LMMS\0" | ||
VALUE "ProductVersion", "2.3.0/@VERSION@\0" | ||
END | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters