Refactored and enhanced all CMakeLists.txt
This commit is contained in:
parent
95a7d5fb78
commit
b72b745a51
|
@ -1,6 +1,11 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(liboceanography C)
|
||||
|
||||
include_directories(src)
|
||||
|
||||
add_definitions(-Wall -W -Wextra -Wstrict-prototypes -pedantic -ansi -std=c89)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
include_directories(.)
|
||||
add_definitions(-Wall -Wextra -pedantic -ansi -std=c89)
|
||||
set(oceanography_lib_src oceanography.c)
|
||||
link_libraries(m)
|
||||
|
||||
add_library(oceanography SHARED oceanography.c)
|
||||
add_library(oceanography SHARED ${oceanography_lib_src})
|
||||
|
||||
set_target_properties(oceanography
|
||||
PROPERTIES
|
||||
VERSION 1.0.0
|
||||
SOVERSION 1)
|
||||
|
||||
install(TARGETS oceanography
|
||||
DESTINATION lib
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
||||
install(FILES oceanography.h
|
||||
DESTINATION include
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
include_directories (. ../src/)
|
||||
add_definitions(-Wall -Wextra -pedantic -ansi -std=c89)
|
||||
link_libraries(check oceanography)
|
||||
|
||||
add_executable(test_oceanography ${COMMON} test_oceanography.c)
|
||||
add_executable(test_oceanography test_oceanography.c)
|
||||
|
||||
enable_testing()
|
||||
add_test(test_oceanography test_oceanography)
|
||||
|
|
Loading…
Reference in New Issue