Skip to content

Commit

Permalink
New CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
fypc committed Aug 23, 2021
1 parent 1ba47a7 commit 69d86af
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 32 deletions.
21 changes: 8 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# CMakeLists files in this project can
# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
cmake_minimum_required (VERSION 3.1)
project (JonkerVolgenant VERSION 1.0
DESCRIPTION "Library for the Jonker-Volgenant algorithm to solve the assignement problem in a bipartite graph"
Expand All @@ -19,14 +16,12 @@ add_library (JonkerVolgenant SHARED
src/interface.c
)

target_compile_options(JonkerVolgenant PRIVATE -O2)
set_target_properties(JonkerVolgenant PROPERTIES PUBLIC_HEADER src/assignAlgs2D.h)
set_property(TARGET JonkerVolgenant PROPERTY C_STANDARD 99)
set_property(TARGET JonkerVolgenant PROPERTY C_STANDARD_REQUIRED TRUE)
target_include_directories(JonkerVolgenant PRIVATE .)
include(GNUInstallDirs)
install(TARGETS JonkerVolgenant
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# Enable relative RPATH
if (APPLE)
set_target_properties(JonkerVolgenantFramework PROPERTIES FRAMEWORK TRUE FRAMEWORK_VERSION C)
elseif (UNIX)
endif()

install(TARGETS JonkerVolgenant DESTINATION lib)
install(TARGETS JonkerVolgenantFramework DESTINATION lib)

17 changes: 17 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### LICENSE:

The source code is in the public domain and not licensed or under
copyright. The information and software may be used freely by the public.
As required by 17 U.S.C. 403, third parties producing copyrighted works
consisting predominantly of the material produced by U.S. government
agencies must provide notice with such work(s) identifying the U.S.
Government material incorporated and stating that such material is not
subject to copyright protection.

Derived works shall not identify themselves in a manner that implies an
endorsement by or an affiliation with the Naval Research Laboratory.

RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE
SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY THE NAVAL
RESEARCH LABORATORY FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE ACTIONS
OF RECIPIENT IN THE USE OF THE SOFTWARE.
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,3 @@ details on the algorithm.

January 2018 David F. Crouse, Naval Research Laboratory, Washington D.C.
(UNCLASSIFIED) DISTRIBUTION STATEMENT A. Approved for public release.


### LICENSE:

The source code is in the public domain and not licensed or under
copyright. The information and software may be used freely by the public.
As required by 17 U.S.C. 403, third parties producing copyrighted works
consisting predominantly of the material produced by U.S. government
agencies must provide notice with such work(s) identifying the U.S.
Government material incorporated and stating that such material is not
subject to copyright protection.

Derived works shall not identify themselves in a manner that implies an
endorsement by or an affiliation with the Naval Research Laboratory.

RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE
SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY THE NAVAL
RESEARCH LABORATORY FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE ACTIONS
OF RECIPIENT IN THE USE OF THE SOFTWARE.
32 changes: 32 additions & 0 deletions _CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CMakeLists files in this project can
# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
cmake_minimum_required (VERSION 3.1)
project (JonkerVolgenant VERSION 1.0
DESCRIPTION "Library for the Jonker-Volgenant algorithm to solve the assignement problem in a bipartite graph"
LANGUAGES C)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_C_FLAGS "-Wall -Wextra")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_RELEASE "-O2")

add_library (JonkerVolgenant SHARED
src/assign2DCBasic.c
src/interface.c
)

# target_compile_options(JonkerVolgenant PRIVATE -O2)
set_target_properties(JonkerVolgenant PROPERTIES PUBLIC_HEADER src/assignAlgs2D.h)
set_property(TARGET JonkerVolgenant PROPERTY C_STANDARD 99)
set_property(TARGET JonkerVolgenant PROPERTY C_STANDARD_REQUIRED TRUE)
target_include_directories(JonkerVolgenant PRIVATE .)
include(GNUInstallDirs)
install(TARGETS JonkerVolgenant
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

0 comments on commit 69d86af

Please sign in to comment.