8000 Added CMake by smorey2 · Pull Request #2 · tordex/simpledib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 template class="js-flash-template">

Added CMake #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ local.properties
*.suo
*.user
*.sln.docstates
.vs

# Build results
cmake-build-*/
[Dd]ebug/
[Rr]elease/
[Dd]ebug64/
Expand Down
36 changes: 36 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.11)
project(simpledib LANGUAGES C CXX)

set(SOURCE_SIMPLEDIB
dib.cpp
)

set(HEADER_SIMPLEDIB
dib.h
)

add_library(${PROJECT_NAME} ${SOURCE_SIMPLEDIB})

set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 11
C_STANDARD 99
PUBLIC_HEADER "${HEADER_SIMPLEDIB}"
)

# Export litehtml includes.
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>)
target_include_directories(${PROJECT_NAME} PRIVATE include/${PROJECT_NAME})

# install and export
install(TARGETS ${PROJECT_NAME}
EXPORT simpledibTargets
RUNTIME DESTINATION bin COMPONENT libraries
ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT libraries
LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT libraries
PUBLIC_HEADER DESTINATION include/simpledib
)
install(FILES cmake/simpledibConfig.cmake DESTINATION lib${LIB_SUFFIX}/cmake/simpledib)
install(EXPORT simpledibTargets FILE simpledibTargets.cmake DESTINATION lib${LIB_SUFFIX}/cmake/simpledib)
307 changes: 0 additions & 307 deletions simpledib.vcproj

This file was deleted.

0