40 lines
847 B
CMake
40 lines
847 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(dropshell_template_registry)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
# Find all source files in src directory
|
|
file(GLOB_RECURSE SOURCES
|
|
"src/*.cpp"
|
|
)
|
|
|
|
# Find all header files in src directory
|
|
file(GLOB_RECURSE HEADERS
|
|
"src/*.hpp"
|
|
)
|
|
|
|
# Add include directories
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
)
|
|
|
|
# Create executable
|
|
add_executable(dropshell_template_registry ${SOURCES})
|
|
|
|
# Link libraries
|
|
target_link_libraries(dropshell_template_registry
|
|
pthread
|
|
)
|
|
|
|
# Set compile options for static linking
|
|
set_target_properties(dropshell_template_registry PROPERTIES
|
|
LINK_SEARCH_START_STATIC ON
|
|
LINK_SEARCH_END_STATIC ON
|
|
)
|
|
|
|
# Install target
|
|
install(TARGETS dropshell_template_registry
|
|
RUNTIME DESTINATION bin
|
|
) |