This file contains hidden or 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
| project( demo ) | |
| cmake_minimum_required( VERSION 2.8.9 ) | |
| add_subdirectory( helloworld ) | |
| add_subdirectory( staticlib ) | |
| add_subdirectory( dynamiclib ) | |
| add_subdirectory( phone ) |
This file contains hidden or 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
| cmake_minimum_required(VERSION 2.8.9) | |
| project (phone) | |
| #Define GNU standard installation directories | |
| include( GNUInstallDirs ) | |
| #In case load library from system. For the static library and shared library: | |
| #set ( PROJECT_LINK_LIBS libsoftware.a libhardware.dylib) | |
| # link library from installed directory | |
| #link_directories( ${CMAKE_INSTALL_FULL_LIBDIR} ) |
This file contains hidden or 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
| cmake_minimum_required(VERSION 2.8.9) | |
| project(software) | |
| #Define GNU standard installation directories | |
| include( GNUInstallDirs ) | |
| #Bring the headers | |
| include_directories(include/software) | |
| #Can manually add the sources using the set command as follows: |
This file contains hidden or 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
| cmake_minimum_required(VERSION 3.15) | |
| project(hardware) | |
| # Define GNU standard installation directories | |
| include( GNUInstallDirs ) | |
| # Bring the headers | |
| include_directories(include/hardware) | |
| # Can manually add the sources using the set command as follows: |
This file contains hidden or 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
| cmake_minimum_required(VERSION 2.8.9) | |
| project (hello) | |
| add_executable(hello helloworld.cpp) |
This file contains hidden or 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
| # Specify the source files, target files, the build directories, | |
| # and the install directory | |
| EXECDIR = phone | |
| STATICDIR = staticlib | |
| DYNAMICDIR = dynamiclib | |
| LIBS = $(STATICLIB) $(DYNAMICLIB) | |
| # All the targets in this makefile are phony | |
| .PHONY: all hardware software phone |
This file contains hidden or 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
| # Specify the source files, target files, the build directories, | |
| # and the install directory | |
| SOURCES = phone.cpp | |
| OBJECTS = $(SOURCES:.cpp=.o) | |
| OUTPUTFILE = phone | |
| LIBSTATIC = libhardware.a | |
| LIBDYNAMIC = libsoftware.dylib | |
| STATICDIR = ../staticlib | |
| DYNAMICDIR = ../dynamiclib | |
| INSTALLDIR = ../binaries |
This file contains hidden or 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
| # Specify the source files, the target files, | |
| # and the install directory | |
| SOURCES = src/gmail.cpp src/googlemap.cpp src/software.cpp | |
| OBJECTS = $(SOURCES:.cpp=.o) | |
| OUTPUTFILE = libsoftware.dylib | |
| INSTALLDIR = ../binaries | |
| CFLAGS=-I include/software | |
| .PHONY: all | |
| all: $(OUTPUTFILE) |
This file contains hidden or 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
| # Specify extensions of files to delete when cleaning | |
| CLEANEXTS = o a | |
| SOURCES = src/camera.cpp src/screen.cpp src/hardware.cpp | |
| OBJECTS = $(SOURCES:.cpp=.o) | |
| OUTPUTFILE=libhardware.a | |
| INSTALLDIR = ../binaries | |
| # | |
| # Add the include path | |
| # |
This file contains hidden or 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
| # Specify the target file and the install directory | |
| OUTPUTFILE=hello | |
| INSTALLDIR=binaries | |
| # Default target | |
| .PHONY: all | |
| all: $(OUTPUTFILE) | |
| # This rule tells make how to build hello from hello.cpp | |
| #OUTPUTFILE: helloworld.cpp |
NewerOlder