Skip to content

Commit 5994f90

Browse files
simplify and cleanup CMake changes
1 parent aaeb223 commit 5994f90

File tree

3 files changed

+2
-39
lines changed

3 files changed

+2
-39
lines changed

CMakeLists.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,6 @@ set(PUBLIC_HEADERS
6060
libmseed.h
6161
)
6262

63-
# Internal header files
64-
set(INTERNAL_HEADERS
65-
extraheaders.h
66-
gmtime64.h
67-
mseedformat.h
68-
msio.h
69-
packdata.h
70-
unpack.h
71-
unpackdata.h
72-
yyjson.h
73-
)
74-
7563
# Handle URL support with libcurl
7664
if(LIBMSEED_URL)
7765
find_package(CURL REQUIRED)
@@ -245,13 +233,6 @@ install(FILES
245233
)
246234

247235
# Generate and install pkg-config file
248-
configure_file(
249-
${CMAKE_CURRENT_SOURCE_DIR}/mseed.pc.in
250-
${CMAKE_CURRENT_BINARY_DIR}/mseed.pc
251-
@ONLY
252-
)
253-
254-
# Set variables for pkg-config
255236
set(PREFIX ${CMAKE_INSTALL_PREFIX})
256237
set(EXEC_PREFIX ${CMAKE_INSTALL_PREFIX})
257238
set(LIBDIR ${CMAKE_INSTALL_FULL_LIBDIR})

example/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ foreach(program ${EXAMPLE_PROGRAMS})
3333
# Link against the library
3434
target_link_libraries(${program} PRIVATE ${MSEED_LIBRARY})
3535

36-
# Add dependency to ensure library is built first
37-
add_dependencies(${program} ${MSEED_LIBRARY})
38-
3936
# Set output directory
4037
set_target_properties(${program} PROPERTIES
4138
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin

test/CMakeLists.txt

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@ set(EXAMPLE_TESTS
2727
)
2828

2929
# Determine which library target to use
30-
# On Windows, prefer static to avoid DLL path issues during testing
31-
if(WIN32 AND TARGET mseed_static)
30+
# Prefer static library to avoid shared library path issues during testing
31+
if(TARGET mseed_static)
3232
set(MSEED_TEST_LIBRARY mseed_static)
3333
elseif(TARGET mseed_shared)
3434
set(MSEED_TEST_LIBRARY mseed_shared)
35-
elseif(TARGET mseed_static)
36-
set(MSEED_TEST_LIBRARY mseed_static)
3735
else()
3836
message(FATAL_ERROR "No libmseed library target available for tests")
3937
endif()
@@ -94,16 +92,3 @@ endforeach()
9492
# Copy test data directory to build directory
9593
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
9694
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
97-
98-
# On Windows with shared library, copy the DLL to the test output directory
99-
# so that tests can find it at runtime
100-
if(WIN32 AND MSEED_TEST_LIBRARY STREQUAL "mseed_shared")
101-
# Use the first test program to determine the output directory
102-
list(GET TEST_PROGRAMS 0 FIRST_TEST)
103-
add_custom_command(TARGET ${FIRST_TEST} POST_BUILD
104-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
105-
$<TARGET_FILE:mseed_shared>
106-
$<TARGET_FILE_DIR:${FIRST_TEST}>
107-
COMMENT "Copying mseed DLL to test directory"
108-
)
109-
endif()

0 commit comments

Comments
 (0)