Initial project setup

This commit is contained in:
Blue 2023-08-27 14:55:04 -03:00
parent 14d7f0d5e0
commit 17881c4066
Signed by: blue
GPG Key ID: 9B203B252A63EE38
6 changed files with 63 additions and 5 deletions

1
CHANGELOG.md Normal file
View File

@ -0,0 +1 @@

46
CMakeLists.txt Normal file
View File

@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.0)
project(mason
VERSION 0.0.1
DESCRIPTION "Javascript application project build tool"
LANGUAGES CXX
)
cmake_policy(SET CMP0076 NEW)
cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0079 NEW)
set(CMAKE_CXX_STANDARD 17)
include(GNUInstallDirs)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
list(APPEND COMPILE_OPTIONS -O3)
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND COMPILE_OPTIONS -g)
list(APPEND COMPILE_OPTIONS -Wall)
list(APPEND COMPILE_OPTIONS -Wextra)
endif()
add_executable(${PROJECT_NAME})
target_compile_options(${PROJECT_NAME} PRIVATE ${COMPILE_OPTIONS})
set_property(TARGET ${PROJECT_NAME} PROPERTY VERSION ${version})
set_property(TARGET ${PROJECT_NAME} PROPERTY SOVERSION 1)
set_property(TARGET ${PROJECT_NAME} PROPERTY
INTERFACE_${PROJECT_NAME}_MAJOR_VERSION 1)
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY
COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION
)
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(src)
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
)

View File

@ -1,3 +1,3 @@
# mason
# Mason
Javascript application project build tool

View File

@ -1,3 +0,0 @@
[Project]
Name=mason
Manager=KDevGenericManager

8
src/CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
set(SOURCES
main.cpp
)
set(HEADERS
)
target_sources(${PROJECT_NAME} PRIVATE ${SOURCES})

6
src/main.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main(int argc, char *argv[]) {
std::cout << "Ahh, shit! Here we go again!" << std::endl;
return 0;
}