-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed some goofball mistakes, added standard project constants
- Loading branch information
Showing
8 changed files
with
39 additions
and
10 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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
INCLUDE (CheckIncludeFiles) | ||
include(CheckIncludeFiles) | ||
include(GNUInstallDirs) | ||
|
||
# define project | ||
cmake_minimum_required (VERSION 3.5) | ||
project (jstrings VERSION 1.1 LANGUAGES CXX) | ||
set(PROJECT_CONTACT "Damian R ([email protected])") | ||
set(PROJECT_WEBSITE "https://github.com/drojaazu") | ||
|
||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/project.hpp.cfg" "${CMAKE_CURRENT_SOURCE_DIR}/src/project.hpp") | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_COMPILER_NAMES clang++ g++ icpc c++ cxx) | ||
|
@@ -16,12 +21,12 @@ if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) | |
endif() | ||
|
||
# define target | ||
aux_source_directory(${PROJECT_SOURCE_DIR}/src CPPFILES) | ||
add_executable(jstrings ${CPPFILES}) | ||
aux_source_directory("${CMAKE_CURRENT_SOURCE_DIR}/src" SRCFILES) | ||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/inc") | ||
|
||
add_executable(${PROJECT_NAME} ${SRCFILES}) | ||
|
||
target_include_directories(jstrings PUBLIC "${PROJECT_SOURCE_DIR}/inc") | ||
target_compile_features(jstrings PUBLIC cxx_std_11) | ||
target_link_libraries(jstrings png) | ||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) | ||
|
||
install(TARGETS jstrings | ||
RUNTIME DESTINATION bin) |
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 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 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 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 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 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 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,19 @@ | ||
#ifndef __MAIN_HPP | ||
#define __MAIN_HPP | ||
|
||
#include <string> | ||
|
||
/* | ||
These values should be set within CMakeLists.txt | ||
*/ | ||
namespace PROJECT { | ||
static unsigned int const VERSION_MAJOR{@PROJECT_VERSION_MAJOR@}; | ||
static unsigned int const VERSION_MINOR{@PROJECT_VERSION_MINOR@}; | ||
static unsigned int const VERSION_PATCH{@PROJECT_VERSION_PATCH@}; | ||
static std::string const VERSION{"@PROJECT_VERSION@"}; | ||
|
||
static std::string const PROJECT_NAME{"@PROJECT_NAME@"}; | ||
static std::string const PROJECT_CONTACT{"@PROJECT_CONTACT@"}; | ||
static std::string const PROJECT_WEBSITE{"@PROJECT_WEBSITE@"}; | ||
} | ||
#endif |