Skip to content

Commit

Permalink
Fix cmake build and install
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Oct 9, 2023
1 parent c1b0064 commit 7468434
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 775 deletions.
22 changes: 0 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
Makefile
config.h
config.status
libtool
man/Makefile
psfex.spec
src/.deps/
src/Makefile
src/fits/.deps/
src/fits/Makefile
src/levmar/.deps/
src/levmar/Makefile
src/wcs/.deps/
src/wcs/Makefile
stamp-h1
autom4te.cache/
src/fits/libfits.a
src/levmar/liblevmar.a
src/psfex
src/wcs/libwcs_c.a
man/psfex.1

# Produced by scons, in building the library
.sconf_temp/
.sconsign.dblite
Expand Down
20 changes: 16 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ endif()

include(GNUInstallDirs)

include(FindPkgConfig)
pkg_search_module(FFTW3 REQUIRED fftw3f)
find_library(FFTW3 fftw3 REQUIRED)

find_package(GSL REQUIRED)

Expand Down Expand Up @@ -47,7 +46,9 @@ set(SOURCE_FILES
src/xml.c
)

add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES})
set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 99)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-unknown-pragmas -Wno-unused-local-typedefs)

target_include_directories(${PROJECT_NAME}
PUBLIC
Expand All @@ -64,4 +65,15 @@ target_link_libraries(${PROJECT_NAME}

set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1)
POSITION_INDEPENDENT_CODE ON)

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)

install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/"
DESTINATION "${CMAKE_INSTALL_PREFIX}/include"
FILES_MATCHING
PATTERN "*.h"
)

6 changes: 0 additions & 6 deletions SConstruct

This file was deleted.

22 changes: 0 additions & 22 deletions lib/SConscript

This file was deleted.

29 changes: 0 additions & 29 deletions man/Makefile.am

This file was deleted.

0 comments on commit 7468434

Please sign in to comment.