Skip to content

Commit f0b601d

Browse files
committed
copying the makefile preserving history -- done
Signed-off-by: Anton Dukhovnikov <[email protected]>
1 parent 638b38e commit f0b601d

File tree

2 files changed

+2
-146
lines changed

2 files changed

+2
-146
lines changed

CMakeLists_tmp.txt renamed to CMakeLists.txt

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ include_directories( "${PROJECT_SOURCE_DIR}/include" )
7474
add_definitions( -DPACKAGE="RAWTOACES" -DVERSION="${RAWTOACES_VERSION}" )
7575
add_subdirectory("src/${RAWTOACESIDTLIB}")
7676
add_subdirectory("src/${RAWTOACESLIB}")
77-
77+
add_subdirectory("src/rawtoaces")
7878

7979

8080
# Create a RAWTOACESBuildTreeSettings.cmake file for the use from the build tree
@@ -102,36 +102,9 @@ if ( APPLE OR UNIX )
102102
install (DIRECTORY data DESTINATION include/rawtoaces)
103103
endif()
104104

105-
### to build rawtoaces ###
106-
107-
add_executable( rawtoaces
108-
main.cpp
109-
)
110-
111-
target_include_directories( rawtoaces
112-
PUBLIC
113-
${AcesContainer_INCLUDE_DIRS}
114-
)
115-
116-
target_link_libraries ( rawtoaces
117-
PUBLIC
118-
${RAWTOACESLIB}
119-
INTERFACE
120-
Boost::headers
121-
)
122-
123-
if ( LIBRAW_CONFIG_FOUND )
124-
target_link_libraries ( rawtoaces PUBLIC libraw::raw )
125-
else ()
126-
target_link_directories(rawtoaces PUBLIC ${libraw_LIBRARY_DIRS} )
127-
target_link_libraries(rawtoaces PUBLIC ${libraw_LIBRARIES} ${libraw_LDFLAGS_OTHER} )
128-
endif ()
129-
130105
enable_testing()
131106
add_subdirectory(unittest)
132107

133-
install( TARGETS rawtoaces DESTINATION bin )
134-
135108
# uninstall target
136109
configure_file(
137110
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"

src/rawtoaces/CMakeLists.txt

Lines changed: 1 addition & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,5 @@
11
cmake_minimum_required(VERSION 3.5)
2-
project( RAWTOACES )
3-
4-
set( RAWTOACES_MAJOR_VERSION 1 )
5-
set( RAWTOACES_MINOR_VERSION 0 )
6-
set( RAWTOACES_PATCH_VERSION 0 )
7-
set( RAWTOACES_VERSION ${RAWTOACES_MAJOR_VERSION}.${RAWTOACES_MINOR_VERSION}.${RAWTOACES_PATCH_VERSION} )
8-
9-
set(RAWTOACESIDTLIB "rawtoaces_idt")
10-
set(RAWTOACESLIB "rawtoaces_util")
11-
12-
set( CMAKE_MACOSX_RPATH 1 )
13-
14-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
15-
# set(warnings "/W4 /WX /EHsc")
16-
add_compile_options ( /W0 )
17-
add_compile_definitions( NOMINMAX )
18-
endif()
19-
20-
if (NOT CONFIGURED_ONCE)
21-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}")
22-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${warnings}")
23-
endif()
24-
25-
## Make install directories overridable
26-
set( INSTALL_LIB_DIR lib CACHE PATH "Install directory for libraries" )
27-
set( INSTALL_BIN_DIR bin CACHE PATH "Install directory for executable binaries" )
28-
set( INSTALL_INCLUDE_DIR include CACHE PATH "Install directory for public header files" )
29-
if( WIN32 AND NOT CYGWIN )
30-
set(DEF_INSTALL_CMAKE_DIR CMake)
31-
else()
32-
set(DEF_INSTALL_CMAKE_DIR lib/CMake/RAWTOACES)
33-
endif()
34-
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Install directory for project CMake files" )
35-
36-
# use, i.e. don't skip the full RPATH for the build tree
37-
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
38-
# when building, don't use the install RPATH already
39-
# (but later on when installing)
40-
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
41-
# SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
42-
# add the automatically determined parts of the RPATH
43-
# which point to directories outside the build tree to the install RPATH
44-
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
45-
# the RPATH to be used when installing, but only if it's not a system directory
46-
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
47-
IF("${isSystemDir}" STREQUAL "-1")
48-
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
49-
ENDIF("${isSystemDir}" STREQUAL "-1")
50-
51-
## convert install paths to absolute
52-
foreach( p LIB BIN INCLUDE CMAKE )
53-
set( var INSTALL_${p}_DIR )
54-
if( NOT IS_ABSOLUTE "${${var}}" )
55-
set( ${var} "${CMAKE_INSTALL_PREFIX}/${${var}}" )
56-
endif()
57-
endforeach()
58-
59-
option( ENABLE_SHARED "Enable Shared Libraries" ON )
60-
61-
if ( ENABLE_SHARED )
62-
set ( DO_SHARED SHARED )
63-
else ()
64-
set ( DO_SHARED STATIC )
65-
endif ()
66-
67-
include ( configure.cmake )
68-
69-
70-
# generated config files end up in binary dir so to find them, need
71-
# to add to include path
72-
include_directories( "${PROJECT_SOURCE_DIR}/include" )
73-
74-
add_definitions( -DPACKAGE="RAWTOACES" -DVERSION="${RAWTOACES_VERSION}" )
75-
add_subdirectory("src/${RAWTOACESIDTLIB}")
76-
add_subdirectory("src/${RAWTOACESLIB}")
77-
78-
79-
80-
# Create a RAWTOACESBuildTreeSettings.cmake file for the use from the build tree
81-
file(RELATIVE_PATH CONF_REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}")
82-
configure_file(config/RAWTOACESBuildTreeSettings.cmake.in "${PROJECT_BINARY_DIR}/RAWTOACESBuildTreeSettings.cmake" @ONLY)
83-
configure_file(config/RAWTOACESConfig.cmake.in "${PROJECT_BINARY_DIR}/RAWTOACESConfig.cmake" @ONLY)
84-
configure_file(config/RAWTOACESConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/RAWTOACESConfigVersion.cmake" @ONLY)
85-
86-
if ( PKG_CONFIG_FOUND )
87-
configure_file(config/RAWTOACES.pc.in "${PROJECT_BINARY_DIR}/RAWTOACES.pc" @ONLY)
88-
install( FILES "${PROJECT_BINARY_DIR}/RAWTOACES.pc" DESTINATION lib/pkgconfig COMPONENT dev )
89-
endif()
90-
91-
install( FILES
92-
"${PROJECT_BINARY_DIR}/RAWTOACESConfig.cmake"
93-
"${PROJECT_BINARY_DIR}/RAWTOACESConfigVersion.cmake"
94-
DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
95-
96-
if ( WIN32 AND NOT CYGWIN )
97-
install( FILES "${PROJECT_BINARY_DIR}/RAWTOACESLibraryDepends.cmake" DESTINATION
98-
"${INSTALL_CMAKE_DIR}" COMPONENT dev )
99-
endif( )
100-
101-
if ( APPLE OR UNIX )
102-
install (DIRECTORY data DESTINATION include/rawtoaces)
103-
endif()
104-
105-
### to build rawtoaces ###
2+
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" )
1063

1074
add_executable( rawtoaces
1085
main.cpp
@@ -127,18 +24,4 @@ else ()
12724
target_link_libraries(rawtoaces PUBLIC ${libraw_LIBRARIES} ${libraw_LDFLAGS_OTHER} )
12825
endif ()
12926

130-
enable_testing()
131-
add_subdirectory(unittest)
132-
13327
install( TARGETS rawtoaces DESTINATION bin )
134-
135-
# uninstall target
136-
configure_file(
137-
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
138-
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
139-
IMMEDIATE @ONLY)
140-
141-
add_custom_target(uninstall
142-
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
143-
144-

0 commit comments

Comments
 (0)