Skip to content

Commit

Permalink
Allow PROJECT_YEAR override (#3016)
Browse files Browse the repository at this point in the history
* Allow PROJECT_YEAR override

* Generate release information and build with it

* Delegate to maintenance tasks
  • Loading branch information
jasp00 authored and tresf committed Feb 5, 2017
1 parent c10af18 commit 30f1e52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
24 changes: 2 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ INCLUDE(FindPkgConfig)

STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE)

# Timestamp available since cmake 2.8.11
IF(CMAKE_VERSION VERSION_LESS "2.8.11")
EXECUTE_PROCESS(COMMAND date +%Y OUTPUT_VARIABLE PROJECT_YEAR OUTPUT_STRIP_TRAILING_WHITESPACE)
ELSE()
STRING(TIMESTAMP PROJECT_YEAR "%Y")
ENDIF()
# Updated by maintenance tasks
SET(PROJECT_YEAR 2015)

SET(PROJECT_AUTHOR "LMMS Developers")
SET(PROJECT_URL "http://lmms.io")
Expand Down Expand Up @@ -461,22 +457,6 @@ FILE(REMOVE include/lmmsconfig.h)
FILE(GLOB LMMS_INCLUDES "${CMAKE_SOURCE_DIR}/include/*.h")
LIST(SORT LMMS_INCLUDES)

# Get list of all committers from git history, ordered by number of commits.
# The CONTRIBUTORS file is used by AboutDialog. This information can be provided
# with -DCONTRIBUTORS=/path/to/CONTRIBUTORS instead. For instance, to generate
# this file for version 1.1.3, the command is:
# git shortlog -sne v1.1.3 | cut -c8-
FIND_PACKAGE(Git)
IF(GIT_FOUND AND NOT CONTRIBUTORS)
SET(CONTRIBUTORS "${CMAKE_BINARY_DIR}/CONTRIBUTORS")
EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" shortlog -sne
COMMAND cut -c8-
OUTPUT_FILE "${CONTRIBUTORS}"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
TIMEOUT 1)
ENDIF()

# embedded resources stuff
IF(WIN32 OR WIN64)
# compile buildtools native
Expand Down
Empty file added doc/CONTRIBUTORS
Empty file.
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ IF(WIN32)
DEPENDS "${CMAKE_BINARY_DIR}/lmms.rc")
ENDIF()

SET(lmms_EMBEDDED_RESOURCES "${CMAKE_SOURCE_DIR}/doc/AUTHORS" "${CMAKE_SOURCE_DIR}/LICENSE.txt" "${CONTRIBUTORS}")
SET(lmms_EMBEDDED_RESOURCES
"${CMAKE_SOURCE_DIR}/doc/AUTHORS"
"${CMAKE_SOURCE_DIR}/LICENSE.txt"
"${CMAKE_SOURCE_DIR}/doc/CONTRIBUTORS")
SET(LMMS_ER_H "${CMAKE_CURRENT_BINARY_DIR}/embedded_resources.h")
ADD_CUSTOM_COMMAND(OUTPUT "${LMMS_ER_H}" COMMAND "${BIN2RES}" ARGS ${lmms_EMBEDDED_RESOURCES} > "\"${LMMS_ER_H}\"" DEPENDS bin2res)

Expand Down

2 comments on commit 30f1e52

@tresf
Copy link
Member

@tresf tresf commented on 30f1e52 Apr 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukas-w @Umcaruje I really think this needs to be reverted for 1.2.0. I won't have the bandwidth to correct this before the 1.2.0 release and our RCs have had an empty contributors area for a long time now.

@lukas-w
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tresf PR opened #4307

Please sign in to comment.