Skip to content

Commit

Permalink
install meta
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Dec 21, 2023
1 parent 44630ca commit 9044019
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
cmake_minimum_required(VERSION 3.14...3.28)
project(GKlib LANGUAGES C)

project(GKlib LANGUAGES C
VERSION 1.0.0
)

enable_testing()

option(BUILD_TESTING "Build tests" ON)

option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND GKlib_IS_TOP_LEVEL)
set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/local" CACHE PATH "install prefix" FORCE)
endif()

set(CMAKE_C_STANDARD 99)

message(STATUS "${PROJECT_NAME} ${PROJECT_VERSION} Arch: ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "${PROJECT_NAME} ${PROJECT_VERSION} CMake ${CMAKE_VERSION} Arch: ${CMAKE_SYSTEM_PROCESSOR} install prefix: ${CMAKE_INSTALL_PREFIX}")

set(GKLIB_PATH ${PROJECT_SOURCE_DIR})

Expand Down Expand Up @@ -37,5 +45,7 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS GKlib)
install(TARGETS GKlib EXPORT ${PROJECT_NAME}-targets)
install(FILES ${GKlib_includes} TYPE INCLUDE)

include(cmake/install.cmake)
5 changes: 2 additions & 3 deletions LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.

3 changes: 0 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ foreach(prog IN ITEMS strings gksort fis gkrw gkgraph csrcnv grKx m2mnbrs cmpnbr
add_test(NAME ${prog} COMMAND ${prog})
endif()
endforeach()

# Install a subset of them
install(TARGETS csrcnv)

0 comments on commit 9044019

Please sign in to comment.