File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.14...3.28 )
2- project (GKlib LANGUAGES C )
2+
3+ project (GKlib LANGUAGES C
4+ VERSION 1.0.0
5+ )
6+
37enable_testing ()
48
59option (BUILD_TESTING "Build tests" ON )
610
711option (BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF )
812
13+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND GKlib_IS_TOP_LEVEL)
14+ set (CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR } /local" CACHE PATH "install prefix" FORCE )
15+ endif ()
16+
917set (CMAKE_C_STANDARD 99)
1018
11- message (STATUS "${PROJECT_NAME } ${PROJECT_VERSION } Arch: ${CMAKE_SYSTEM_PROCESSOR } " )
19+ message (STATUS "${PROJECT_NAME } ${PROJECT_VERSION } CMake ${ CMAKE_VERSION } Arch: ${CMAKE_SYSTEM_PROCESSOR } install prefix: ${ CMAKE_INSTALL_PREFIX } " )
1220
1321set (GKLIB_PATH ${PROJECT_SOURCE_DIR } )
1422
@@ -37,5 +45,7 @@ if(BUILD_TESTING)
3745add_subdirectory (test )
3846endif ()
3947
40- install (TARGETS GKlib)
48+ install (TARGETS GKlib EXPORT ${ PROJECT_NAME } - targets )
4149install (FILES ${GKlib_includes} TYPE INCLUDE)
50+
51+ include (cmake/install.cmake )
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ http://www.apache.org/licenses/LICENSE-2.0
1212
1313Unless required by applicable law or agreed to in writing, software
1414distributed under the License is distributed on an "AS IS" BASIS,
15- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16- implied. See the License for the specific language governing
15+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16+ implied. See the License for the specific language governing
1717permissions and limitations under the License.
18-
Original file line number Diff line number Diff line change @@ -17,6 +17,3 @@ foreach(prog IN ITEMS strings gksort fis gkrw gkgraph csrcnv grKx m2mnbrs cmpnbr
1717 add_test (NAME ${prog} COMMAND ${prog} )
1818 endif ()
1919endforeach ()
20-
21- # Install a subset of them
22- install (TARGETS csrcnv)
You can’t perform that action at this time.
0 commit comments