Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Libcoincellhell
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klemm, Carl Philipp
Libcoincellhell
Commits
0ec7d189
Commit
0ec7d189
authored
2 years ago
by
Carl Philipp Klemm
Browse files
Options
Downloads
Patches
Plain Diff
Add windows cross compileing support
parent
912f83b1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+5
-5
5 additions, 5 deletions
CMakeLists.txt
crossW64.cmake
+9
-0
9 additions, 0 deletions
crossW64.cmake
with
14 additions
and
5 deletions
CMakeLists.txt
+
5
−
5
View file @
0ec7d189
...
@@ -12,18 +12,18 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
...
@@ -12,18 +12,18 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set
(
SRC_FILES eismultiplexer.c usbshm.c
)
set
(
SRC_FILES eismultiplexer.c usbshm.c
)
add_library
(
${
PROJECT_NAME
}
SHARED
${
SRC_FILES
}
)
add_library
(
${
PROJECT_NAME
}
SHARED
${
SRC_FILES
}
)
target_link_libraries
(
${
PROJECT_NAME
}
${
LIBUSB_LIBRARIES
}
-pthread
)
target_link_libraries
(
${
PROJECT_NAME
}
${
LIBUSB_LIBRARIES
}
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC
${
LIBUSB_INCLUDE_DIRS
}
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC
${
LIBUSB_INCLUDE_DIRS
}
)
add_definitions
(
"-std=c17 -Wall -O2 -fno-strict-aliasing"
)
add_definitions
(
"-std=c17 -Wall -O2 -fno-strict-aliasing"
)
install
(
TARGETS
${
PROJECT_NAME
}
DESTINATION lib
)
install
(
TARGETS
${
PROJECT_NAME
}
DESTINATION lib
)
install
(
FILES ./eismultiplexer.h DESTINATION include
)
install
(
FILES ./eismultiplexer.h DESTINATION include
)
link_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
link_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
${
PROJECT_NAME
}
_
test
main.c
)
add_executable
(
${
PROJECT_NAME
}
_
cli
main.c
)
add_dependencies
(
${
PROJECT_NAME
}
_
test
${
PROJECT_NAME
}
)
add_dependencies
(
${
PROJECT_NAME
}
_
cli
${
PROJECT_NAME
}
)
target_link_libraries
(
${
PROJECT_NAME
}
_
test -l
${
PROJECT_NAME
}
)
target_link_libraries
(
${
PROJECT_NAME
}
_
cli
${
PROJECT_NAME
}
)
add_definitions
(
"-std=c17 -Wall -O2 -fno-strict-aliasing"
)
add_definitions
(
"-std=c17 -Wall -O2 -fno-strict-aliasing"
)
install
(
TARGETS
${
PROJECT_NAME
}
_
test
DESTINATION bin
)
install
(
TARGETS
${
PROJECT_NAME
}
_
cli
DESTINATION bin
)
configure_file
(
pkgconfig/eismuliplexer.pc.in pkgconfig/eismuliplexer.pc @ONLY
)
configure_file
(
pkgconfig/eismuliplexer.pc.in pkgconfig/eismuliplexer.pc @ONLY
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/pkgconfig/eismuliplexer.pc DESTINATION lib/pkgconfig
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/pkgconfig/eismuliplexer.pc DESTINATION lib/pkgconfig
)
...
...
This diff is collapsed.
Click to expand it.
crossW64.cmake
0 → 100644
+
9
−
0
View file @
0ec7d189
set
(
CMAKE_SYSTEM_NAME Windows
)
set
(
CMAKE_C_COMPILER x86_64-w64-mingw32-gcc
)
set
(
CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++
)
set
(
CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY
)
set
(
CMAKE_EXE_LINKER_FLAGS
"-static"
)
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
".a"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment