Skip to content

Commit

Permalink
Changes to CMakeLists.txt; Bump to version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TricksterGuy committed Nov 21, 2015
1 parent 12d752a commit c380ac4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 70 deletions.
92 changes: 29 additions & 63 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,26 @@
cmake_minimum_required (VERSION 2.6)
project (nin10kit)

EXECUTE_PROCESS( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )

set(MAJOR_VERSION "1")
set(MINOR_VERSION "1")
set(PATCH_VERSION "0")
set(STRING_VERSION "1.1.0")

set(CPACK_BINARY_DEB "ON")
set(CPACK_BINARY_RPM "ON")
set(CPACK_BINARY_TGZ "ON")
set(CPACK_BINARY_ZIP "ON")
set(CPACK_GENERATOR "DEB")

set(CPACK_NSIS_DISPLAY_NAME "nin10kit ${STRING_VERSION}")
set(CPACK_NSIS_PACKAGE_NAME "nin10kit ${STRING_VERSION}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tools for developing on Nintendo handheld systems")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "nin10kit ${STRING_VERSION}")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "nin10kit ${STRING_VERSION}")
set(CPACK_PACKAGE_VERSION ${STRING_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
set(CPACK_SOURCE_GENERATOR "")
set(CPACK_SOURCE_TGZ "ON")

set(CPACK_DEBIAN_PACKAGE_NAME "nin10kit")
set(CPACK_DEBIAN_PACKAGE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-0, libmagick++-dev, libmagickcore-dev, libmagickwand-dev")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Brandon Whitehead <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ".")

set(CPACK_PACKAGE_FILE_NAME "nin10kit-${STRING_VERSION}-${ARCHITECTURE}")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE})

include(CPack)
include(FindPkgConfig)

option(ENABLE_DEBUG "Build debug version" OFF)

IF(ENABLE_DEBUG)
set(CMAKE_CXX_FLAGS "-g -pg -Wall -std=c++11 -fopenmp")
set(CMAKE_CXX_FLAGS "-g -pg -Wall -std=c++11")
ELSE()
set(CMAKE_CXX_FLAGS "-O3 -Wall -std=c++11 -fopenmp")
set(CMAKE_CXX_FLAGS "-O3 -Wall -std=c++11")
set(CMAKE_EXE_LINKER_FLAGS "-s")
ENDIF(ENABLE_DEBUG)
set(CMAKE_SKIP_RPATH TRUE)

# Source files definition
set(SRC_SHARED
shared/3ds-exporter.cpp
shared/ds-exporter.cpp
shared/gba-exporter.cpp
shared/cmd-line-parser-helper.cpp
shared/color.cpp
shared/cpercep.cpp
shared/dither.cpp
shared/3ds-exporter.cpp
shared/ds-exporter.cpp
shared/gba-exporter.cpp
shared/cmd-line-parser-helper.cpp
shared/color.cpp
shared/cpercep.cpp
shared/dither.cpp
shared/exportfile.cpp
shared/fileutils.cpp
shared/headerfile.cpp
Expand All @@ -65,7 +30,7 @@ set(SRC_SHARED
shared/image8.cpp
shared/implementationfile.cpp
shared/logger.cpp
shared/lut-exporter.cpp
shared/lut-exporter.cpp
shared/lutgen.cpp
shared/map.cpp
shared/mediancut.cpp
Expand All @@ -79,7 +44,7 @@ set(SRC_SHARED
)

set(SRC_NIN10KIT
cli/main.cpp
cli/main.cpp
)

set(SRC_NIN10KITGUI
Expand All @@ -104,41 +69,42 @@ link_directories(${nin10kit_SOURCE_DIR}/shared)
add_definitions(-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16)

add_library(
shared_files
STATIC
${SRC_SHARED}
shared_files
STATIC
${SRC_SHARED}
)

target_link_libraries(
shared_files
${ImageMagick_LIBRARIES}
shared_files
${ImageMagick_LIBRARIES}
)

add_executable(
nin10kit
nin10kit
${SRC_NIN10KIT}
)

target_link_libraries(
nin10kit
m
shared_files
${ImageMagick_LIBRARIES}
${wxWidgets_LIBRARIES}
nin10kit
m
shared_files
${ImageMagick_LIBRARIES}
${wxWidgets_LIBRARIES}
)

add_executable(
nin10kitgui
nin10kitgui
${SRC_NIN10KITGUI}
)

target_link_libraries(
nin10kitgui
m
shared_files
${ImageMagick_LIBRARIES}
nin10kitgui
m
shared_files
${ImageMagick_LIBRARIES}
${wxWidgets_LIBRARIES}
)

install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nin10kit DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nin10kitgui DESTINATION bin)
install(FILES readme.pdf DESTINATION share/doc/nin10kit)
14 changes: 7 additions & 7 deletions shared/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
namespace AutoVersion{

//Date Version Types
static const char DATE[] = "29";
static const char MONTH[] = "3";
static const char DATE[] = "21";
static const char MONTH[] = "11";
static const char YEAR[] = "2015";
static const char UBUNTU_VERSION_STYLE[] = "15.03";
static const char UBUNTU_VERSION_STYLE[] = "15.11";

//Software Status
static const char STATUS[] = "Alpha";
static const char STATUS_SHORT[] = "a";

//Standard Version Type
static const long MAJOR = 1;
static const long MINOR = 1;
static const long MINOR = 2;
static const long BUILD = 0;
static const long REVISION = 0;

//Miscellaneous Version Types
static const long BUILDS_COUNT = 0;
#define RC_FILEVERSION 1,1,0,0
#define RC_FILEVERSION_STRING "1, 1, 0, 0\0"
static const char FULLVERSION_STRING[] = "1.1.0.0";
#define RC_FILEVERSION 1,2,0,0
#define RC_FILEVERSION_STRING "1, 2, 0, 0\0"
static const char FULLVERSION_STRING[] = "1.2.0.0";

//These values are to keep track of your versioning state, don't modify them.
static const long BUILD_HISTORY = 0;
Expand Down

0 comments on commit c380ac4

Please sign in to comment.