mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-08 18:27:07 -08:00
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 2f3b26d..4c543bf 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -28,6 +28,8 @@ else()
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic" )
|
|
endif()
|
|
|
|
+option(ENABLE_TOOLS "Install opj2dat command line util" ON)
|
|
+
|
|
# compile-time configuration variables to be linked in
|
|
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
@@ -44,7 +46,6 @@ set (devel-headers
|
|
OriginObj.h
|
|
OriginFile.h
|
|
OriginParser.h
|
|
- tree.hh
|
|
)
|
|
|
|
# object library
|
|
@@ -87,6 +88,7 @@ if (BUILD_SHARED_LIBS)
|
|
endif ()
|
|
|
|
# command line util
|
|
+if(ENABLE_TOOLS)
|
|
if (BUILD_STATIC_LIBS)
|
|
add_executable(opj2dat opj2dat.cpp)
|
|
target_link_libraries (opj2dat origin_static)
|
|
@@ -94,6 +96,7 @@ elseif (BUILD_SHARED_LIBS)
|
|
add_executable(opj2dat opj2dat.cpp)
|
|
target_link_libraries (opj2dat origin_shared)
|
|
endif ()
|
|
+endif ()
|
|
|
|
# Generate a pkg-config file matching this config
|
|
configure_file("liborigin.pc.in" "liborigin.pc" @ONLY)
|
|
@@ -103,7 +106,9 @@ install(FILES ${devel-headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liborigin
|
|
# install pkg-config file
|
|
if (BUILD_STATIC_LIBS OR BUILD_SHARED_LIBS)
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
+ if(ENABLE_TOOLS)
|
|
install(TARGETS opj2dat DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
|
+ endif ()
|
|
endif ()
|
|
|
|
# documentation
|